Skip to content

Commit

Permalink
Merge pull request cloud-bulldozer#123 from chentex/fix-missing-metrics
Browse files Browse the repository at this point in the history
Fixes missing metrics, adds bucketed count
  • Loading branch information
chentex authored Jul 12, 2023
2 parents cb4217e + 486473e commit dfb6512
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pkg/tests/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,13 @@ func (r *Runner) Run(ctx context.Context) error {

var metrics vegeta.Metrics
metrics.Histogram = &vegeta.Histogram{
Buckets: vegeta.Buckets{time.Millisecond},
Buckets: vegeta.Buckets{0 * time.Millisecond,
50 * time.Millisecond,
100 * time.Millisecond,
300 * time.Millisecond,
500 * time.Millisecond,
1000 * time.Millisecond,
5000 * time.Millisecond},
}

// Bind "Test Harness"
Expand Down Expand Up @@ -141,17 +147,15 @@ func (r *Runner) Run(ctx context.Context) error {
}
}
}
testOptions.Metrics.Close()

// Index result file

serverVersion := helpers.GetServerVersion(ctx, conn)
r.logger.Info(ctx, "server version %s", serverVersion)
err = elastic.IndexFile(ctx, r.testID, serverVersion, testOptions.TestName, fileName, *testOptions.Metrics, r.logger)
if err != nil {
r.logger.Error(ctx, "%s", err)
}

testOptions.Metrics.Close()
wg.Done()
return nil
}(ctx, concurrentConnections, i, conn, t)
Expand Down

0 comments on commit dfb6512

Please sign in to comment.