package
0.0.0-20210902034828-42829d4bdecd
Repository: https://github.com/baidu/go-lib.git
Documentation: pkg.go.dev

# Functions

GetCdHierJson gets hierarchical counter diff of json formatParams: - cd: flat counter diffReturns: - []byte: json formated byte - error: error msg.
GetSdHierJson gets hierarchical StataData of json format Params: - sd: flat state data Returns: - []byte: json formated byte - error: error msg.
KeyGen generate and escape key for key-value output Params: - key: the original key - keyPrefix: e.g., "mod_header" - programName: e.g., "bfe" - withProgramName: whether program name should be included in the result Returns: final key, e.g., "mod_header_ERR_PB_SEEK", "bfe.mod_header_ERR_PB_SEEK"(with programName).
NewCounters creates new Counters.
NewFloatCounters creates new Counters for float64.
No description provided by the author
NextInterval calculates seconds left for next interval Params: - now: current time - interval: in seconds Returns: seconds left for next interval .

# Structs

No description provided by the author
diff of two counters */.
State is state with mutex protect.
StateData holds state data.

# Type aliases

Counters holds counters for given key.
FloatCounters is flat counters for float64.