README
¶
Metrics
Tool used primarily for development, to help triage bottlenecks experience during codegen
This tool was introduced when working on optimizations to codegen and has been preserved for use in future development
MeasureElapsed
A convenient way to measure how long an operation took to run:
func longRunningOperation() {
defer metrics.MeasureElapsed("long-running-operation", time.Now())
...
}
IncrementFrequency
A convenient way to count the number of times an operation is run:
func frequentOperation() {
metrics.IncrementFrequency("frequent-operation")
...
}
Flush
A way to flush the aggregate metrics at the end of a run:
func confusingWorkflow() {
...
metrics.Flush(os.Stdout)
}
Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IncrementFrequency ¶
func IncrementFrequency(key string)
func MeasureElapsed ¶
func NewAggregator ¶
func NewAggregator()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.