-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add missing docstrings for Base.Sys #52777
Conversation
Signed-off-by: 11happy <[email protected]>
Signed-off-by: 11happy <[email protected]>
Signed-off-by: 11happy <[email protected]>
Signed-off-by: 11happy <[email protected]>
Hello @stevengj & @inkydragon I have incorporated the suggested changes can you please look into it. |
It seems like a historical artifact that we have both It seems like we should just add a function show(io::IO, ::MIME"text/plain", cpu::AbstractVector{CPUinfo})
summary(io, cpu)
println(io, ':')
cpu_summary(io, cpu)
end We can continue to export Also, the And if we are documenting the |
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Co-authored-by: Steven G. Johnson <[email protected]>
Signed-off-by: 11happy <[email protected]>
Unrelated CI failures, should be good to merge. |
I noticed in #52777 that `Sys.SC_CLK_TCK` is set to `0` on Windows, which is treated as an unknown clock-tick unit. This undocumented global variable is *only* used by `Sys` to display CPU load times from the `CPUInfo` data structure, which until #52777 was completely undocumented and only seems to be used by `versioninfo(verbose=true)`. On POSIX systems it is set to a `> 0` value, and is used to convert the CPU times into seconds. On Windows, it is set to `0`, which is treated as an unknown unit, so the CPU times are displayed without units. Since it is only used for CPU times, we can look at the [`uv_cpu_info` implementation](https://github.com/libuv/libuv/blob/3b6a1a14caeeeaf5510f2939a8e28ed9ba0ad968/src/win/util.c#L531-L653) to see how libuv computes these values on Windows. This function calls `pNtQuerySystemInformation`, which returns times in ["100ns intervals"](https://learn.microsoft.com/en-us/windows/win32/api/winternl/nf-winternl-ntquerysysteminformation#system_processor_performance_information), i.e. in units of 10⁻⁷ seconds. However, `uv_cpu_info` then divides these values by `10000`, which converts them to units of milliseconds. So, I believe that the correct value of `Sys.SC_CLK_TCK` on Windows is `1000`. Basically this just means that `versioninfo(verbose=true)` output on Windows will get units of seconds when printing CPU loads. As far as I can tell, no external package is using these (undocumented until now) timing values — the few packages that call `Sys.cpu_info()` only do so to get the `model` (string) field.
Ten different "update sysinfo.jl" commits being in |
Those are actually the commit suggestions directly using Github UI as suggested by @stevengj . |
I am sorry for such messy commit history,I will keep this in mind next time. |
It's not necessarily your fault (and it's not some huge issue anyway). I suppose @inkydragon should have squashed the commits while/before merging into master. |
I wish there was a way to disable anything but "squash and merge" on github for the whole repository. It's too easy to click "merge" instead by accident. |
It looks like it was squashed into a single commit eb26d63, so what's the problem? |
All the commits are now on the master branch, I see them cluttering my Not a big deal in any case. |
Oh, I see, I was just looking at the merge commit. Looks like the same thing (merge, not squash-and-merge) happened with #52936 😢 |
Apologies for the mess, I didn't realize that the default merge method should be squash-and-merge. Not sure if there is anything I can do to eliminate the mess. On the other hand, the default merge method is a convention that should probably be documented in devdoc. And furthermore, Julia needs something like a Python developer's guide. |
Definitely don't do that, rewriting the history for
From what I've observed squash-and-merge is what people do here unless there's a |
Besides simply reducing clutter, squashing is important because otherwise you will often get commits in the history that leave the repo in a broken state, breaking I agree that it should only be done retro-actively in drastic situations, and that it should be added to developer docs. But I think that this is mainly a UI issue — it's just too easy to click the "merge" button accidentally, when in fact this should be marked as a dangerous action. |
I filed an issue about squash-merging (see link above) — let's continue further discussion there. |
Part of #52725 .
Thank you.
CC: