Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

Data Generator

Dana Van Aken edited this page Dec 12, 2017 · 4 revisions

This page discusses how to use the scripts located in the controller_simulator directory to generate fake knob/metric data and then load it into a user's session. All of the commands issued below are being executed in the website's root directory.

How to generate data

The data_generator.py script creates fake workload data. It requires two command-line arguments: (1) the number of workloads to generate data for and (2) the number of knob/metric samples to create per workload. For example, to create data for 2 workloads, with 5 samples per workload, run:

python script/controller_simulator/data_generator.py 2 5

The generated data will be output into the directory script/controller/simulator/generated_data.

How to upload data

The upload_data.py script uploads workload results for a given session. It takes two command-line arguments: (1) the path to the directory where the data is stored, and (2) the session's upload code (see finding the upload code). For example, to upload the data we just generated to the test user's basic_session, run:

python script/controller_simulator/upload_data.py script/controller_simulator/generated_data 1234567890

You should now see that this generated data has been uploaded to the user's basic_session. Specifically, the number of knob/metric samples for workloads "workload-0" and "workload-1" increased from 20 to 25.