Add binary sizes to stress test metrics

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-12-15 12:49:59 -05:00
parent 00bc24fcea
commit 0725b60402
3 changed files with 43 additions and 15 deletions

View File

@@ -23,6 +23,22 @@ import (
const imageName = "docker.io/library/alpine:latest"
var (
ct metrics.LabeledTimer
errCounter metrics.LabeledCounter
binarySizeGauge metrics.LabeledGauge
)
func init() {
ns := metrics.NewNamespace("stress", "", nil)
// if you want more fine grained metrics then you can drill down with the metrics in prom that
// containerd is outputing
ct = ns.NewLabeledTimer("run", "Run time of a full container during the test", "commit")
binarySizeGauge = ns.NewLabeledGauge("binary_size", "Binary size of compiled binaries", "name")
errCounter = ns.NewLabeledCounter("errors", "Errors encountered running the stress tests", "err")
metrics.Register(ns)
}
type run struct {
total int
failures int
@@ -152,6 +168,7 @@ func serve(c config) error {
logrus.WithError(err).Error("listen and serve")
}
}()
checkBinarySizes()
return test(c)
}