package metrics
import "github.com/open-policy-agent/opa/metrics"
Package metrics contains helpers for performance metric management inside the policy engine.
Index ¶
Constants ¶
const ( RegoQueryCompile = "rego_query_compile" RegoQueryEval = "rego_query_eval" RegoQueryParse = "rego_query_parse" )
Well-known metric names.
Types ¶
type Metrics ¶
Metrics defines the interface for a collection of perfomrance metrics in the policy engine.
func New ¶
func New() Metrics
New returns a new Metrics object.
type Sample ¶
type Sample interface {
Value() interface{}
}
Sample defines a common interface to obtain a single metric value.
type Timer ¶
type Timer interface { Sample Start() Stop() }
Timer defines the interface for a restartable timer that accumulates elapsed time.
Source Files ¶
- Version
- v0.5.2
- Published
- Jul 17, 2017
- Platform
- js/wasm
- Imports
- 1 packages
- Last checked
- 1 minute ago –
Tools for package owners.