-
Notifications
You must be signed in to change notification settings - Fork 15
Description
When running benchmarks, it can be useful to collect data in parallel using auxiliary tools. Some tools can be prefixed to the benchmark command, while others may require separate start and stop commands. This section provides an example of how to use a tool in parallel with a benchmark run, storing collected data in a log file.
Example: Running a Data Collection Tool in Parallel
In this example, we use a data collection tool launched via screen, enabling it to run in a separate session while the benchmark tool executes. This setup allows you to start data collection before the benchmark begins and stop it once the benchmark completes.
-
Start the data collection tool:
Before running the benchmark, start the tool in a detached
screensession:
screen -dmS collector data_collection_tool >> /tmp/collector.log
screen -dmS collector: Starts a new detachedscreensession named "collector."data_collection_tool >> /tmp/collector.log: Runs the data collection tool, appending output to/tmp/collector.log.
-
Run the benchmark tool:
Execute your benchmark tool as desired. The data collection tool will run concurrently in the background.
-
Stop the data collection tool:
After the benchmark finishes, stop the
screensession running the data collection tool:
screen -S collector -X quit
This command terminates the "collector" session, stopping the data collection tool.
-
Retrieve the collected data:
Use
cijoeto fetch the log file with the collected data:
cijoe.get("/tmp/collector.log")
This approach allows for flexible data collection without interrupting the benchmark process, and it makes it easy to access the collected data for further analysis.