MCPcopy
hub / github.com/dgraph-io/dgraph / Record

Method Record

x/x.go:896–903  ·  view source on GitHub ↗

Record records an event and assigns it the given name.

(name string)

Source from the content-addressed store, hash-verified

894
895// Record records an event and assigns it the given name.
896func (t *Timer) Record(name string) {
897 now := time.Now()
898 t.records = append(t.records, record{
899 Name: name,
900 Dur: now.Sub(t.last).Round(time.Millisecond),
901 })
902 t.last = now
903}
904
905// Total returns the duration since the timer was started.
906func (t *Timer) Total() time.Duration {

Callers 15

RunMethod · 0.95
purgeBelowMethod · 0.95
RunMethod · 0.95
doQueryMethod · 0.80
MonitorDiskMetricsFunction · 0.80
initFunction · 0.80
MonitorCacheHealthFunction · 0.80
MonitorMemoryMetricsFunction · 0.80
ProcessBackupRequestFunction · 0.80
bleedMethod · 0.80
proposeAndWaitMethod · 0.80
CommitOverNetworkFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected