Skip to content

Commit

Permalink
feat: warmup before gathering results
Browse files Browse the repository at this point in the history
closes #219
  • Loading branch information
jgillich committed Nov 8, 2023
1 parent 904e97c commit 1a440d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run.cr
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ benchmarks.each_with_index do |b, i|
sleep 1
end

res = `bombardier -c #{System.cpu_count * 50} -d 5s -m POST -b '{"query":"{ hello }"}' -H "Content-Type: application/json" -o json -p r http://localhost:8000/graphql`
res = (0...1).map { |_| `bombardier -c #{System.cpu_count * 50} -d 5s -m POST -b '{"query":"{ hello }"}' -H "Content-Type: application/json" -o json -p r http://localhost:8000/graphql` }.last
exit 1 unless $?.success?

p.terminate
Expand Down

0 comments on commit 1a440d7

Please sign in to comment.