From 4b1565764f09c9b80bb7baa58970eb9efa9c5357 Mon Sep 17 00:00:00 2001 From: Sai Sindhur Malleni Date: Wed, 10 Aug 2016 14:04:26 -0400 Subject: [PATCH] Fixing timezone to UTC Currently we use UTC in some places and local time in some. Changing everything to UTC to avoid confusion. Change-Id: I19bab4e41870bbb2fcb68f1dc6c6b9069271c9f9 --- .../files/cloud_system_performance_comparsion.json | 4 ++-- .../roles/grafana-dashboards/templates/all_cpu_graphs.json.j2 | 4 ++-- .../grafana-dashboards/templates/all_disk_graphs.json.j2 | 4 ++-- .../grafana-dashboards/templates/all_memory_graphs.json.j2 | 2 +- .../grafana-dashboards/templates/all_network_graphs.json.j2 | 2 +- .../templates/baremetal_general_system_performance.json.j2 | 2 +- .../templates/graphite_general_system_performance.json.j2 | 2 +- .../templates/guest_general_system_performance.json.j2 | 2 +- .../templates/openstack_general_system_performance.json.j2 | 2 +- browbeat.py | 2 +- lib/PerfKit.py | 2 +- lib/Shaker.py | 4 ++-- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ansible/install/roles/grafana-dashboards/files/cloud_system_performance_comparsion.json b/ansible/install/roles/grafana-dashboards/files/cloud_system_performance_comparsion.json index 0fb9801b1..1c385e805 100644 --- a/ansible/install/roles/grafana-dashboards/files/cloud_system_performance_comparsion.json +++ b/ansible/install/roles/grafana-dashboards/files/cloud_system_performance_comparsion.json @@ -2076,8 +2076,8 @@ "30d" ] }, - "timezone": "browser", + "timezone": "utc", "title": "Cloud System Performance Comparsion", "version": 7 } -} \ No newline at end of file +} diff --git a/ansible/install/roles/grafana-dashboards/templates/all_cpu_graphs.json.j2 b/ansible/install/roles/grafana-dashboards/templates/all_cpu_graphs.json.j2 index c93409905..6b715f6a8 100644 --- a/ansible/install/roles/grafana-dashboards/templates/all_cpu_graphs.json.j2 +++ b/ansible/install/roles/grafana-dashboards/templates/all_cpu_graphs.json.j2 @@ -8,7 +8,7 @@ "{{dashboard_cloud_name}}" ], "style": "dark", - "timezone": "browser", + "timezone": "utc", "editable": true, "hideControls": false, "sharedCrosshair": false, @@ -190,4 +190,4 @@ ], "overwrite": true } -} \ No newline at end of file +} diff --git a/ansible/install/roles/grafana-dashboards/templates/all_disk_graphs.json.j2 b/ansible/install/roles/grafana-dashboards/templates/all_disk_graphs.json.j2 index 76df1b2c4..73821a7cd 100644 --- a/ansible/install/roles/grafana-dashboards/templates/all_disk_graphs.json.j2 +++ b/ansible/install/roles/grafana-dashboards/templates/all_disk_graphs.json.j2 @@ -8,7 +8,7 @@ "{{dashboard_cloud_name}}" ], "style": "dark", - "timezone": "browser", + "timezone": "utc", "editable": true, "hideControls": false, "sharedCrosshair": false, @@ -344,4 +344,4 @@ ], "overwrite": true } -} \ No newline at end of file +} diff --git a/ansible/install/roles/grafana-dashboards/templates/all_memory_graphs.json.j2 b/ansible/install/roles/grafana-dashboards/templates/all_memory_graphs.json.j2 index 00a3eda43..972376acd 100644 --- a/ansible/install/roles/grafana-dashboards/templates/all_memory_graphs.json.j2 +++ b/ansible/install/roles/grafana-dashboards/templates/all_memory_graphs.json.j2 @@ -8,7 +8,7 @@ "{{dashboard_cloud_name}}" ], "style": "dark", - "timezone": "browser", + "timezone": "utc", "editable": true, "hideControls": false, "sharedCrosshair": false, diff --git a/ansible/install/roles/grafana-dashboards/templates/all_network_graphs.json.j2 b/ansible/install/roles/grafana-dashboards/templates/all_network_graphs.json.j2 index 81201ac16..a127f1ed3 100644 --- a/ansible/install/roles/grafana-dashboards/templates/all_network_graphs.json.j2 +++ b/ansible/install/roles/grafana-dashboards/templates/all_network_graphs.json.j2 @@ -8,7 +8,7 @@ "{{dashboard_cloud_name}}" ], "style": "dark", - "timezone": "browser", + "timezone": "utc", "editable": true, "hideControls": false, "sharedCrosshair": false, diff --git a/ansible/install/roles/grafana-dashboards/templates/baremetal_general_system_performance.json.j2 b/ansible/install/roles/grafana-dashboards/templates/baremetal_general_system_performance.json.j2 index d29a75c78..bf5f5ae56 100644 --- a/ansible/install/roles/grafana-dashboards/templates/baremetal_general_system_performance.json.j2 +++ b/ansible/install/roles/grafana-dashboards/templates/baremetal_general_system_performance.json.j2 @@ -2716,7 +2716,7 @@ "30d" ] }, - "timezone": "browser", + "timezone": "utc", "title": "{{item.process_list_name}} General System Performance", "version": 1 } diff --git a/ansible/install/roles/grafana-dashboards/templates/graphite_general_system_performance.json.j2 b/ansible/install/roles/grafana-dashboards/templates/graphite_general_system_performance.json.j2 index cf05d95ec..b3788ec87 100644 --- a/ansible/install/roles/grafana-dashboards/templates/graphite_general_system_performance.json.j2 +++ b/ansible/install/roles/grafana-dashboards/templates/graphite_general_system_performance.json.j2 @@ -3139,7 +3139,7 @@ "30d" ] }, - "timezone": "browser", + "timezone": "utc", "title": "{{item.process_list_name}} General System Performance", "version": 1 } diff --git a/ansible/install/roles/grafana-dashboards/templates/guest_general_system_performance.json.j2 b/ansible/install/roles/grafana-dashboards/templates/guest_general_system_performance.json.j2 index ebf612a29..927716af8 100644 --- a/ansible/install/roles/grafana-dashboards/templates/guest_general_system_performance.json.j2 +++ b/ansible/install/roles/grafana-dashboards/templates/guest_general_system_performance.json.j2 @@ -2269,7 +2269,7 @@ "30d" ] }, - "timezone": "browser", + "timezone": "utc", "title": "{{item.process_list_name}} General System Performance", "version": 1 } diff --git a/ansible/install/roles/grafana-dashboards/templates/openstack_general_system_performance.json.j2 b/ansible/install/roles/grafana-dashboards/templates/openstack_general_system_performance.json.j2 index 98216fdff..2204959c8 100644 --- a/ansible/install/roles/grafana-dashboards/templates/openstack_general_system_performance.json.j2 +++ b/ansible/install/roles/grafana-dashboards/templates/openstack_general_system_performance.json.j2 @@ -3991,7 +3991,7 @@ "30d" ] }, - "timezone": "browser", + "timezone": "utc", "title": "{{item.process_list_name}} General System Performance", "tags": [ "OSP" diff --git a/browbeat.py b/browbeat.py index 45a2a95ba..ca7827f30 100755 --- a/browbeat.py +++ b/browbeat.py @@ -114,7 +114,7 @@ def main(): _logger.error("If you meant 'all' use: './browbeat.py all' or './browbeat.py'") exit(1) else: - time_stamp = datetime.datetime.now().strftime("%Y%m%d-%H%M%S") + time_stamp = datetime.datetime.utcnow().strftime("%Y%m%d-%H%M%S") _logger.info("Browbeat test suite kicked off") _logger.info("Browbeat UUID: {}".format(browbeat_uuid)) _logger.info("Running workload(s): {}".format(','.join(_cli_args.workloads))) diff --git a/lib/PerfKit.py b/lib/PerfKit.py index 66fd401dc..a8c0d4dd8 100644 --- a/lib/PerfKit.py +++ b/lib/PerfKit.py @@ -155,7 +155,7 @@ class PerfKit(WorkloadBase): def start_workloads(self): self.logger.info("Starting PerfKitBenchmarker Workloads.") - time_stamp = datetime.datetime.now().strftime("%Y%m%d-%H%M%S") + time_stamp = datetime.datetime.utcnow().strftime("%Y%m%d-%H%M%S") self.logger.debug("Time Stamp (Prefix): {}".format(time_stamp)) benchmarks = self.config.get('perfkit')['benchmarks'] if (benchmarks is not None and len(benchmarks) > 0): diff --git a/lib/Shaker.py b/lib/Shaker.py index 68ff9b428..3899e9137 100644 --- a/lib/Shaker.py +++ b/lib/Shaker.py @@ -392,7 +392,7 @@ class Shaker(WorkloadBase): def run_shaker(self): self.logger.info("Starting Shaker workloads") - time_stamp = datetime.datetime.now().strftime("%Y%m%d-%H%M%S") + time_stamp = datetime.datetime.utcnow().strftime("%Y%m%d-%H%M%S") self.logger.debug("Time Stamp (Prefix): {}".format(time_stamp)) scenarios = self.config.get('shaker')['scenarios'] venv = self.config['shaker']['venv'] @@ -413,7 +413,7 @@ class Shaker(WorkloadBase): scenario['name']) workload = self.__class__.__name__ self.workload_logger(result_dir, workload) - time_stamp1 = datetime.datetime.now().strftime( + time_stamp1 = datetime.datetime.utcnow().strftime( "%Y%m%d-%H%M%S") test_name = "{}-browbeat-{}-{}".format( time_stamp1, "shaker", scenario['name'])