cmd/swarm/swarm-smoke: remove wrong metrics (#18970)
This commit is contained in:
parent
f9401ae011
commit
c5c9cef5c0
@ -43,13 +43,6 @@ type uploadResult struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func slidingWindow(c *cli.Context) error {
|
func slidingWindow(c *cli.Context) error {
|
||||||
defer func(now time.Time) {
|
|
||||||
totalTime := time.Since(now)
|
|
||||||
|
|
||||||
log.Info("total time", "time", totalTime)
|
|
||||||
metrics.GetOrRegisterCounter("sliding-window.total-time", nil).Inc(int64(totalTime))
|
|
||||||
}(time.Now())
|
|
||||||
|
|
||||||
generateEndpoints(scheme, cluster, appName, from, to)
|
generateEndpoints(scheme, cluster, appName, from, to)
|
||||||
hashes := []uploadResult{} //swarm hashes of the uploads
|
hashes := []uploadResult{} //swarm hashes of the uploads
|
||||||
nodes := to - from
|
nodes := to - from
|
||||||
|
@ -33,12 +33,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func uploadAndSync(c *cli.Context) error {
|
func uploadAndSync(c *cli.Context) error {
|
||||||
defer func(now time.Time) {
|
|
||||||
totalTime := time.Since(now)
|
|
||||||
log.Info("total time", "time", totalTime, "kb", filesize)
|
|
||||||
metrics.GetOrRegisterResettingTimer("upload-and-sync.total-time", nil).Update(totalTime)
|
|
||||||
}(time.Now())
|
|
||||||
|
|
||||||
generateEndpoints(scheme, cluster, appName, from, to)
|
generateEndpoints(scheme, cluster, appName, from, to)
|
||||||
seed := int(time.Now().UnixNano() / 1e6)
|
seed := int(time.Now().UnixNano() / 1e6)
|
||||||
|
|
||||||
|
@ -30,13 +30,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func uploadSpeed(c *cli.Context) error {
|
func uploadSpeed(c *cli.Context) error {
|
||||||
defer func(now time.Time) {
|
|
||||||
totalTime := time.Since(now)
|
|
||||||
|
|
||||||
log.Info("total time", "time", totalTime, "kb", filesize)
|
|
||||||
metrics.GetOrRegisterCounter("upload-speed.total-time", nil).Inc(int64(totalTime))
|
|
||||||
}(time.Now())
|
|
||||||
|
|
||||||
endpoint := generateEndpoint(scheme, cluster, appName, from)
|
endpoint := generateEndpoint(scheme, cluster, appName, from)
|
||||||
seed := int(time.Now().UnixNano() / 1e6)
|
seed := int(time.Now().UnixNano() / 1e6)
|
||||||
log.Info("uploading to "+endpoint, "seed", seed)
|
log.Info("uploading to "+endpoint, "seed", seed)
|
||||||
|
@ -46,12 +46,12 @@ var (
|
|||||||
func wrapCliCommand(name string, killOnTimeout bool, command func(*cli.Context) error) func(*cli.Context) error {
|
func wrapCliCommand(name string, killOnTimeout bool, command func(*cli.Context) error) func(*cli.Context) error {
|
||||||
return func(ctx *cli.Context) error {
|
return func(ctx *cli.Context) error {
|
||||||
log.PrintOrigins(true)
|
log.PrintOrigins(true)
|
||||||
log.Root().SetHandler(log.LvlFilterHandler(log.Lvl(verbosity), log.StreamHandler(os.Stdout, log.TerminalFormat(true))))
|
log.Root().SetHandler(log.LvlFilterHandler(log.Lvl(verbosity), log.StreamHandler(os.Stdout, log.TerminalFormat(false))))
|
||||||
|
|
||||||
defer func(now time.Time) {
|
defer func(now time.Time) {
|
||||||
totalTime := time.Since(now)
|
totalTime := time.Since(now)
|
||||||
|
log.Info("total time", "time", totalTime, "kb", filesize)
|
||||||
log.Info("total time", "time", totalTime)
|
metrics.GetOrRegisterResettingTimer(name+".total-time", nil).Update(totalTime)
|
||||||
metrics.GetOrRegisterCounter(name+".total-time", nil).Inc(int64(totalTime))
|
|
||||||
}(time.Now())
|
}(time.Now())
|
||||||
|
|
||||||
log.Info("smoke test starting", "task", name, "timeout", timeout)
|
log.Info("smoke test starting", "task", name, "timeout", timeout)
|
||||||
|
Loading…
Reference in New Issue
Block a user