aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2016-02-24 17:31:52 -0800
committerGravatar Sree Kuchibhotla <sreek@google.com>2016-02-25 11:38:19 -0800
commitf63c49238e1696d2f74c68d6323e959ceb8b8791 (patch)
treea324b70590dee26e72b7a8b559dd44958c2acb4e /tools/run_tests
parent8bcbee815c5d7aa6cda13371241536db6dc03fbb (diff)
Some more cleanup
Diffstat (limited to 'tools/run_tests')
-rwxr-xr-xtools/run_tests/stress_test/stress_test_utils.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/run_tests/stress_test/stress_test_utils.py b/tools/run_tests/stress_test/stress_test_utils.py
index 71f0dcd921..7adc0068f9 100755
--- a/tools/run_tests/stress_test/stress_test_utils.py
+++ b/tools/run_tests/stress_test/stress_test_utils.py
@@ -81,10 +81,9 @@ class BigQueryHelper:
'event_type': event_type,
'details': details
}
- # Something that uniquely identifies the row (Biquery needs it for duplicate
- # detection).
+ # row_unique_id is something that uniquely identifies the row (BigQuery uses
+ # it for duplicate detection).
row_unique_id = '%s_%s_%s' % (self.run_id, self.pod_name, event_type)
-
row = bq_utils.make_row(row_unique_id, row_values_dict)
return bq_utils.insert_rows(self.bq, self.project_id, self.dataset_id,
self.summary_table_id, [row])
@@ -97,6 +96,8 @@ class BigQueryHelper:
'qps': qps
}
+ # row_unique_id is something that uniquely identifies the row (BigQuery uses
+ # it for duplicate detection).
row_unique_id = '%s_%s_%s' % (self.run_id, self.pod_name, recorded_at)
row = bq_utils.make_row(row_unique_id, row_values_dict)
return bq_utils.insert_rows(self.bq, self.project_id, self.dataset_id,
@@ -109,7 +110,6 @@ class BigQueryHelper:
query_job = bq_utils.sync_query_job(self.bq, self.project_id, query)
page = self.bq.jobs().getQueryResults(**query_job['jobReference']).execute(
num_retries=num_query_retries)
- print page
num_failures = int(page['totalRows'])
print 'num rows: ', num_failures
return num_failures > 0
@@ -118,7 +118,8 @@ class BigQueryHelper:
line = '-' * 120
print line
print 'Summary records'
- print 'Run Id', self.run_id
+ print 'Run Id: ', self.run_id
+ print 'Dataset Id: ', self.dataset_id
print line
query = ('SELECT pod_name, image_type, event_type, event_date, details'
' FROM %s.%s WHERE run_id = \'%s\' ORDER by event_date;') % (
@@ -147,6 +148,7 @@ class BigQueryHelper:
print line
print 'QPS Summary'
print 'Run Id: ', self.run_id
+ print 'Dataset Id: ', self.dataset_id
print line
query = (
'SELECT pod_name, recorded_at, qps FROM %s.%s WHERE run_id = \'%s\' '