mirror of
https://github.com/DataDog/go-profiler-notes.git
synced 2026-06-20 16:45:26 +08:00
Fix typo
This commit is contained in:
parent
2ae5e75f9a
commit
dd227fcfa4
1 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ Here we have a single goroutine, let's call it `G1`, that runs the `main` functi
|
|||
|
||||
<img src="./timeline.png" width=600/>
|
||||
|
||||
From the scheduler's perspective, the program above executes like shown below. At first `G1` is `Executing` on `CPU 1`. Then the goroutine is taken off the CPU while `Waiting` for the network. Once the scheduler notices that the network has replied (using non-blocking I/O, similar to to Node.js), it marks the goroutine as `Runnable`. And as soon as a CPU core becomes available, the goroutine starts `Executing` again. In our case all cores are available, so `G1` can go back to `Executing` the `fmt.Printf()` function on one of the CPUs immediately without spending any time in the `Runnable` state.
|
||||
From the scheduler's perspective, the program above executes like shown below. At first `G1` is `Executing` on `CPU 1`. Then the goroutine is taken off the CPU while `Waiting` for the network. Once the scheduler notices that the network has replied (using non-blocking I/O, similar to Node.js), it marks the goroutine as `Runnable`. And as soon as a CPU core becomes available, the goroutine starts `Executing` again. In our case all cores are available, so `G1` can go back to `Executing` the `fmt.Printf()` function on one of the CPUs immediately without spending any time in the `Runnable` state.
|
||||
|
||||
<img src="./scheduler.gif" width=400/>
|
||||
|
||||
|
|
@ -239,4 +239,4 @@ Notes:
|
|||
- Reuse cute gophers from conf talks.
|
||||
- pprof cli tips from rhys h. on gopher slack: Favorite options include edgefraction=0, nodefraction=0, and nodecount of something larger than 80 (but rendering gets slow). Plus focus, and an ever-growing regexp (as I dive in to the profile) in ignore.
|
||||
|
||||
-->
|
||||
-->
|
||||
|
|
|
|||
Loading…
Reference in a new issue