To be able to edit code and run cells, you need to run the notebook yourself. Where would you like to run the notebook?

This notebook takes about 20 seconds to run.

In the cloud (experimental)

Binder is a free, open source service that runs scientific notebooks in the cloud! It will take a while, usually 2-7 minutes to get a session.

On your computer

(Recommended if you want to store your changes.)

  1. Copy the notebook URL:
  2. Run Pluto

    (Also see: How to install Julia and Pluto)

  3. Paste URL in the Open box

Frontmatter

If you are publishing this notebook on the web, you can set the parameters below to provide HTML metadata. This is useful for search engines and social media.

Author 1
👀 Reading hidden code
info = Sys.cpu_info()
17.7 ms
1
👀 Reading hidden code
period = 1
10.3 μs
👀 Reading hidden code
using PlutoUI
179 ms
image/svg+xml image/svg+xml image/svg+xml speed:
👀 Reading hidden code
@bind tick Clock(period)
228 ms
👀 Reading hidden code
36.8 ms
"1.0%"
👀 Reading hidden code
percentage(sum(usages)/length(usages))
23.0 μs
👀 Reading hidden code
usages = let
info = Sys.cpu_info()
busies = busy_time.(info)
idles = idle_time.(info)

sleep(period)

info = Sys.cpu_info()
busies = busy_time.(info) .- busies
idles = idle_time.(info) .- idles


end
1.2 s
"29.1%"
Sys.free_memory() / Sys.total_memory() |> percentage
👀 Reading hidden code
39.8 ms
percentage (generic function with 1 method)
percentage(x::Real) = "$(round(100 * x, digits=1))%"
👀 Reading hidden code
571 μs
busies = busy_time.(info)
👀 Reading hidden code
19.8 μs
idles = idle_time.(info)
👀 Reading hidden code
31.8 ms
idle_time (generic function with 1 method)
idle_time(info::Sys.CPUinfo) = Int64(info.cpu_times!idle)
👀 Reading hidden code
430 μs
busy_time (generic function with 1 method)
busy_time(info::Sys.CPUinfo) =
Int64(
info.cpu_times!user +
info.cpu_times!nice +
info.cpu_times!sys +
info.cpu_times!irq
)
👀 Reading hidden code
505 μs

👀 Reading hidden code
78.3 μs