summaryrefslogtreecommitdiffhomepage
path: root/test/benchmarks/network/node_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/benchmarks/network/node_test.go')
-rw-r--r--test/benchmarks/network/node_test.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/benchmarks/network/node_test.go b/test/benchmarks/network/node_test.go
index 246720d43..3e837a9e4 100644
--- a/test/benchmarks/network/node_test.go
+++ b/test/benchmarks/network/node_test.go
@@ -42,9 +42,14 @@ func BenchmarkNode(b *testing.B) {
if err != nil {
b.Fatalf("Failed to parse parameters: %v", err)
}
+ requests := b.N
+ if requests < c {
+ b.Logf("b.N is %d must be greater than threads %d. Consider running with --test.benchtime=Nx where N >= %d", b.N, c, c)
+ requests = c
+ }
b.Run(name, func(b *testing.B) {
hey := &tools.Hey{
- Requests: b.N * c, // Requests b.N requests per thread.
+ Requests: requests,
Concurrency: c,
}
runNode(b, hey)