summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cli.py2
-rw-r--r--storperf/db/configuration_db.py12
-rw-r--r--storperf/db/job_db.py16
3 files changed, 15 insertions, 15 deletions
diff --git a/cli.py b/cli.py
index 1f20e31..f2fa178 100644
--- a/cli.py
+++ b/cli.py
@@ -154,7 +154,7 @@ def main(argv=None):
raise Usage(content['message'])
if (report is not None):
- print storperf.fetch_results(report, workloads)
+ print storperf.fetch_results(report, workload)
else:
print "Calling start..."
response = requests.post(
diff --git a/storperf/db/configuration_db.py b/storperf/db/configuration_db.py
index 700588d..b12394e 100644
--- a/storperf/db/configuration_db.py
+++ b/storperf/db/configuration_db.py
@@ -51,9 +51,9 @@ class ConfigurationDB(object):
db = sqlite3.connect(ConfigurationDB.db_name)
cursor = db.cursor()
- cursor.execute(
- "delete from configuration where configuration_name=? and key=?",
- (configuration_name, key))
+ cursor.execute("delete from configuration where "
+ "configuration_name=? and key=?",
+ (configuration_name, key))
self.logger.debug("Deleted " + configuration_name + ":" + key)
@@ -105,9 +105,9 @@ class ConfigurationDB(object):
db = sqlite3.connect(ConfigurationDB.db_name)
cursor = db.cursor()
- cursor.execute(
- "delete from configuration where configuration_name=? and key=?",
- (configuration_name, key))
+ cursor.execute("delete from configuration where "
+ "configuration_name=? and key=?",
+ (configuration_name, key))
cursor.execute(
"""insert into configuration(configuration_name, key, value)
diff --git a/storperf/db/job_db.py b/storperf/db/job_db.py
index 8aa4c11..0e94358 100644
--- a/storperf/db/job_db.py
+++ b/storperf/db/job_db.py
@@ -110,8 +110,8 @@ class JobDB(object):
workload_name,
now,))
else:
- self.logger.warn("Duplicate start time for workload "
- + workload_name)
+ self.logger.warn("Duplicate start time for workload %s"
+ % workload_name)
cursor.execute(
"""update jobs set
job_id = ?,
@@ -146,8 +146,8 @@ class JobDB(object):
(self.job_id, workload_name,))
if (row.fetchone() is None):
- self.logger.warn("No start time recorded for workload "
- + workload_name)
+ self.logger.warn("No start time recorded for workload %s"
+ % workload_name)
cursor.execute(
"""insert into jobs
(job_id,
@@ -207,10 +207,10 @@ class JobDB(object):
self.logger.info("workload=" + workload +
"start=" + start_time + " end=" + end_time)
- request = 'http://127.0.0.1:8000/render/?target=*.' + self.job_id + \
- '.' + workload + '.jobs.1.*.clat.mean&format=json&from=' + \
- start_time + "&until=" + end_time
-
+ request = ("http://127.0.0.1:8000/render/?target="
+ "*.%s.%s.jobs.1.*.clat.mean"
+ "&format=json&from=%s&until=%s"
+ % (self.job_id, workload, start_time, end_time))
response = requests.get(request)
if (response.status_code == 200):