package
Version:
v2.2.3
Opens a new window with list of versions in this module.
Published: Feb 16, 2022
License: EUPL-1.2, ISC, MIT, + 1 more
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package metrics collects performance metrics.
Metric is a single metric that's being recorded.
Start recording performance metrics with the given tag.
AddTag adds another part to this metric's tag, for example:
m := Start("hello")
defer m.Done()
if isCached {
m.AddTag("cached")
return cachedItem
}
This will record the cached entries as "hello.cached", separate from the
regular "hello" entries.
Done finishes recording this performance metrics, and actually records it.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.