Store all Rally results under common "rally" directory
This is going to help us easily identify the workload for post processing of JSONs and remove the need for complex regexes and logic in lib/Tools.py for post-processing. Since we have the flexibility to pass *args now, I am also deleting an unused method which is no longer needed. Change-Id: I54e601dde25bba6e5239f4ee1d3a61893cdb50a1
This commit is contained in:
parent
8291e58cdd
commit
fde7e76321
@ -264,9 +264,10 @@ class Rally(WorkloadBase.WorkloadBase):
|
||||
"Overriding Scenario Args: {}".format(scenario))
|
||||
|
||||
result_dir = self.tools.create_results_dir(
|
||||
self.config['browbeat'][
|
||||
'results'], dir_ts, benchmark['name'],
|
||||
scenario_name)
|
||||
self.config['browbeat']['results'], dir_ts,
|
||||
self.__class__.__name__.lower(),
|
||||
benchmark['name'], scenario_name
|
||||
)
|
||||
self.logger.debug(
|
||||
"Created result directory: {}".format(result_dir))
|
||||
workload = self.__class__.__name__
|
||||
|
14
lib/Tools.py
14
lib/Tools.py
@ -52,17 +52,9 @@ class Tools(object):
|
||||
else:
|
||||
return command.strip()
|
||||
|
||||
def create_run_dir(self, results_dir, run):
|
||||
try:
|
||||
os.makedirs("%s/run-%s" % (results_dir, run))
|
||||
return "%s/run-%s" % (results_dir, run)
|
||||
except OSError:
|
||||
return False
|
||||
|
||||
# Create directory for results
|
||||
def create_results_dir(self, results_dir, timestamp, service, scenario):
|
||||
the_directory = "{}/{}/{}/{}".format(results_dir,
|
||||
timestamp, service, scenario)
|
||||
# Create directory for results
|
||||
def create_results_dir(self, *args):
|
||||
the_directory = '/'.join(args)
|
||||
if not os.path.isdir(the_directory):
|
||||
try:
|
||||
os.makedirs(the_directory)
|
||||
|
Loading…
x
Reference in New Issue
Block a user