(pprof) top20 --cum
Showing nodes accounting for 48.43s, 62.77% of 77.15s total
Dropped 343 nodes (cum <= 0.39s)
Showing top 20 nodes out of 63
flat flat% sum% cum cum%
0 0% 0% 44.40s 57.55% google.golang.org/api/support/bundler.(*Bundler).startFlushLocked.func1
0.17s 0.22% 0.22% 44.08s 57.14% google.golang.org/api/support/bundler.(*Bundler).acquire
0.42s 0.54% 0.76% 43.23s 56.03% sync.(*Cond).Wait
33.11s 42.92% 43.68% 33.11s 42.92% runtime.futex
0.25s 0.32% 44.01% 29.68s 38.47% runtime.mcall
0.82s 1.06% 45.07% 29.49s 38.22% sync.(*Mutex).Lock
0.43s 0.56% 45.63% 29.33s 38.02% runtime.park_m
0.22s 0.29% 45.91% 28.32s 36.71% sync.runtime_SemacquireMutex
0.65s 0.84% 46.75% 28.10s 36.42% runtime.semacquire1
2.85s 3.69% 50.45% 24.75s 32.08% runtime.lock
0.13s 0.17% 50.62% 20.55s 26.64% runtime.futexsleep
0.44s 0.57% 51.19% 16.90s 21.91% runtime.schedule
3.52s 4.56% 55.75% 15.37s 19.92% runtime.findrunnable
2.60s 3.37% 59.12% 14.70s 19.05% runtime.unlock
0.04s 0.052% 59.17% 12.73s 16.50% runtime.futexwakeup
0.06s 0.078% 59.25% 11.92s 15.45% runtime.parkunlock_c
0.37s 0.48% 59.73% 9.99s 12.95% sync.(*Mutex).Unlock
0.03s 0.039% 59.77% 9.62s 12.47% sync.runtime_Semrelease
0.46s 0.6% 60.36% 9.59s 12.43% runtime.semrelease1
1.86s 2.41% 62.77% 7.50s 9.72% runtime.runqsteal
Digging deeper:
(pprof) list startFlushLocked.func1
Total: 1.29mins
ROUTINE ======================== google.golang.org/api/support/bundler.(*Bundler).startFlushLocked.func1 in /home/mrjn/go/src/google.golang.org/api/support/bundler/bundler.go
0 44.40s (flat, cum) 57.55% of Total
. . 266: go func() {
. . 267: defer func() {
. . 268: b.sem.Release(int64(bun.size))
. . 269: b.release(ticket)
. . 270: }()
. 44.08s 271: b.acquire(ticket)
. 20ms 272: b.handler(bun.items.Interface())
. 300ms 273: }()
. . 274:}
. . 275:
. . 276:// acquire blocks until ticket is the next to be served, then returns. In order for N
. . 277:// acquire calls to return, the tickets must be in the range [0, N). A ticket must
. . 278:// not be presented to acquire more than once.
ROUTINE ======================== google.golang.org/api/support/bundler.(*Bundler).startFlushLocked.func1.1 in /home/mrjn/go/src/google.golang.org/api/support/bundler/bundler.go
0 300ms (flat, cum) 0.39% of Total
. . 264: ticket := b.nextTicket
. . 265: b.nextTicket++
. . 266: go func() {
. . 267: defer func() {
. . 268: b.sem.Release(int64(bun.size))
. 300ms 269: b.release(ticket)
. . 270: }()
. . 271: b.acquire(ticket)
. . 272: b.handler(bun.items.Interface())
. . 273: }()
. . 274:}