Module: PerformanceTester
- Defined in:
- lib/performance_tester.rb,
lib/performance_tester/logger.rb,
lib/performance_tester/runner.rb,
lib/performance_tester/outcome.rb,
lib/performance_tester/version.rb,
lib/performance_tester/scenario.rb,
lib/performance_tester/csv_logger.rb,
lib/performance_tester/summary_logger.rb
Defined Under Namespace
Classes: CsvLogger, Logger, Outcome, Runner, Scenario, SummaryLogger
Constant Summary
collapse
- VERSION =
"0.0.12"
Class Method Summary
collapse
Class Method Details
.build_scenario(&block) ⇒ Object
10
11
12
|
# File 'lib/performance_tester.rb', line 10
def build_scenario(&block)
Scenario.new(&block)
end
|
.loggers ⇒ Object
6
7
8
|
# File 'lib/performance_tester/logger.rb', line 6
def loggers
@loggers ||= {}
end
|
.register_logger(name, klass) ⇒ Object
10
11
12
|
# File 'lib/performance_tester/logger.rb', line 10
def register_logger(name, klass)
loggers[name] = klass
end
|
.registered_logger(name) ⇒ Object
14
15
16
17
18
|
# File 'lib/performance_tester/logger.rb', line 14
def registered_logger(name)
loggers.fetch(name)
rescue KeyError
raise ArgumentError, "Unregistered logger: #{name}"
end
|
.run_scenario(scenario, options = {}) ⇒ Object
14
15
16
|
# File 'lib/performance_tester.rb', line 14
def run_scenario(scenario, options = {})
Runner.new(options).run(scenario)
end
|