package
Version:
v2.5.0
Opens a new window with list of versions in this module.
Published: Dec 14, 2023
License: EUPL-1.2, ISC, MIT, + 1 more
Opens a new window with license information.
Imports: 5
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.
List metrics, sorted by name.
Sort returns a copy sorted by the given metric.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.