Class: HttpLoader::Harness
- Inherits:
-
Object
- Object
- HttpLoader::Harness
- Extended by:
- T::Sig
- Includes:
- Formatter
- Defined in:
- lib/http_loader/harness.rb,
lib/http_loader/harness/config.rb,
lib/http_loader/harness/formatter.rb,
lib/http_loader/harness/telemetry.rb,
lib/http_loader/harness/process_manager.rb,
lib/http_loader/harness/resource_monitor.rb
Overview
Harness orchestrates the entire load testing lifecycle seamlessly and securely.
Defined Under Namespace
Modules: Formatter Classes: Config, ProcessManager, ResourceMonitor, Telemetry
Instance Method Summary collapse
-
#initialize(config) ⇒ Harness
constructor
A new instance of Harness.
- #start ⇒ Object
Methods included from Formatter
#extract_client_stats, #extract_server_stats, #format_kb_conn, #log_table_row, #print_combined_stats, #print_startup_banner, #print_table_header
Constructor Details
#initialize(config) ⇒ Harness
Returns a new instance of Harness.
19 20 21 22 23 24 25 26 27 |
# File 'lib/http_loader/harness.rb', line 19 def initialize(config) @config = config @start_time = T.let(Time.now.utc, Time) @peak_connections = T.let(0, Integer) log_dir = T.let(File.('../../logs', __dir__), String) @telemetry = T.let(Telemetry.new(log_dir, config.export_json), Telemetry) @pm = T.let(ProcessManager.new(config), ProcessManager) @monitor = T.let(ResourceMonitor.new, ResourceMonitor) end |
Instance Method Details
#start ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/http_loader/harness.rb', line 30 def start $stdout.sync = true bump_file_limits run_lifecycle end |