mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
This library can record points in time and have its objects be passed around across goroutines, and then pretty-print all the data after the procedure is done. Example output: ``` ---- ContainerManager.RestoreSubcontainer timing information ---- [02:07:25.476281] ╭─ ContainerManager.RestoreSubcontainer [02:07:25.476281] +0µs ├─ containerManager locked: 0µs [02:07:25.476503] +221µs ▉▉▉▉▉▉▉▉▉▉▉▉ ├─ spec validated: 221µs [02:07:25.476521] +17µs ▉ ├─ gofer files done: 17µs [02:07:25.476521] +0µs │ ... 0µs ... ╭─ restorer.restoreSubcontainer [02:07:25.476524] +2µs ▏ │ ... 3µs ... ├─ restorer locked: 2µs [02:07:25.476551] +26µs ▉▌ │ ... 30µs ... ├─ subcontainer restore skipped: 26µs [02:07:25.476551] +0µs │ ... 30µs ... ╰─ END: 0µs [02:07:25.476560] +8µs ▌ ╰─ END: 38µs ---- End of ContainerManager.RestoreSubcontainer timing information ---- ``` PiperOrigin-RevId: 752019739
17 lines
294 B
Python
17 lines
294 B
Python
load("//tools:defs.bzl", "go_library")
|
|
|
|
package(
|
|
default_applicable_licenses = ["//:license"],
|
|
licenses = ["notice"],
|
|
)
|
|
|
|
go_library(
|
|
name = "timing",
|
|
srcs = ["timing.go"],
|
|
visibility = ["//:sandbox"],
|
|
deps = [
|
|
"//pkg/atomicbitops",
|
|
"//pkg/log",
|
|
],
|
|
)
|