MCPcopy Index your code
hub / github.com/kopia/kopia / Stats

Method Stats

tests/robustness/engine/stats.go:24–53  ·  view source on GitHub ↗

Stats prints the engine stats, cumulative and from the current run.

()

Source from the content-addressed store, hash-verified

22
23// Stats prints the engine stats, cumulative and from the current run.
24func (e *Engine) Stats() string {
25 b := &strings.Builder{}
26
27 fmt.Fprintln(b, "==================================")
28 fmt.Fprintln(b, "Build Info")
29 fmt.Fprintln(b, "==================================")
30 fmt.Fprintf(b, " Repo build time: %25v\n", repoBuildTime)
31 fmt.Fprintf(b, " Repo git revision: %25v\n", repoGitRevision)
32 fmt.Fprintf(b, " Repo git branch: %25v\n", repoGitBranch)
33 fmt.Fprintln(b, "")
34 fmt.Fprintf(b, " Engine build time: %25v\n", testBuildTime)
35 fmt.Fprintf(b, " Engine git revision: %25v\n", testGitRevision)
36 fmt.Fprintf(b, " Engine git branch: %25v\n", testGitBranch)
37 fmt.Fprintln(b, "")
38 fmt.Fprintln(b, "==================================")
39 fmt.Fprintln(b, "Engine Action Summary (Cumulative)")
40 fmt.Fprintln(b, "==================================")
41 fmt.Fprintf(b, " Engine runtime: %10vs\n", e.getRuntimeSeconds())
42 fmt.Fprintln(b, "")
43 fmt.Fprint(b, e.CumulativeStats.Stats())
44 fmt.Fprintln(b, "")
45
46 fmt.Fprintln(b, "==================================")
47 fmt.Fprintln(b, "Engine Action Summary (This Run)")
48 fmt.Fprintln(b, "==================================")
49 fmt.Fprint(b, e.RunStats.Stats())
50 fmt.Fprintln(b, "")
51
52 return b.String()
53}
54
55// Stats tracks statistics during engine runtime.
56type Stats struct {

Callers 2

ShutdownMethod · 0.95
TestStatsPersistFunction · 0.95

Calls 3

getRuntimeSecondsMethod · 0.95
StatsMethod · 0.65
StringMethod · 0.45

Tested by 1

TestStatsPersistFunction · 0.76