mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-24 22:56:48 +09:00
Bound accessible search probes and reject invalid benchmark responses
This commit is contained in:
1 parent
c49f53d8f8
commit
dbc7620a76
9 files changed
+166
-10
No files matched your search
@@ -3,6 +3,7 @@
|
||||
require "socket"
|
||||
require_relative "support"
|
||||
require_relative "http_client"
|
||||
require_relative "response_contract"
|
||||
|
||||
include BenchmarkSupport
|
||||
options = parse_options("Compare HTTP throughput with Ruby keep-alive clients; every response must be HTTP 200.",
|
||||
@@ -58,9 +59,10 @@ begin
|
||||
cookie = client.login(labels)
|
||||
results = {}
|
||||
paths.each do |name, path|
|
||||
client.measure(path, cookie, concurrency: 1, duration: 3)
|
||||
contract = BenchmarkResponseContract.new(name, File.join(data, "storage/db/production.sqlite3"), labels)
|
||||
client.measure(path, cookie, concurrency: 1, duration: 3, contract: contract)
|
||||
concurrencies.each do |concurrency|
|
||||
results["#{name}_#{concurrency}"] = client.measure(path, cookie, concurrency: concurrency, duration: options[:duration])
|
||||
results["#{name}_#{concurrency}"] = client.measure(path, cookie, concurrency: concurrency, duration: options[:duration], contract: contract)
|
||||
end
|
||||
end
|
||||
write_json(File.join(options[:output], "#{side}-#{iteration + 1}.json"), results)
|
||||
|
||||
Reference in new issue
Block a user