9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/api-tester/modules/benchmark_module.rb', line 9
def self.go(contract)
reports = []
contract.endpoints.each do |endpoint|
longest_time = endpoint.longest_time
longest_time[:time] = longest_time[:time] * 1000.0 if longest_time[:time] > contract.max_time
print 'F'
reports << ResponseTimeReport.new(url: endpoint.url,
verb: longest_time[:verb],
payload: longest_time[:payload],
max_time: contract.max_time,
actual_time: longest_time[:time],
description: 'BenchmarkModule')
else
print '.'
end
end
reports
end
|