Skip to content
Snippets Groups Projects
Commit d8a6a0b0 authored by Georges Da Costa's avatar Georges Da Costa
Browse files

Changes timestamps to int OR floats

parent 1ce6c69f
Branches
No related tags found
No related merge requests found
...@@ -55,9 +55,9 @@ class Power: ...@@ -55,9 +55,9 @@ class Power:
for elements in raws: for elements in raws:
device_id = elements['device_id'] device_id = elements['device_id']
try: try:
timestamps[device_id].append(int(datetime.datetime.strptime(elements['timestamp'], "%Y-%m-%dT%H:%M:%S%z").timestamp())) timestamps[device_id].append(datetime.datetime.strptime(elements['timestamp'], "%Y-%m-%dT%H:%M:%S%z").timestamp())
except: except:
timestamps[device_id].append(int(datetime.datetime.strptime(elements['timestamp'], "%Y-%m-%dT%H:%M:%S.%f%z").timestamp())) timestamps[device_id].append(datetime.datetime.strptime(elements['timestamp'], "%Y-%m-%dT%H:%M:%S.%f%z").timestamp())
values[device_id].append(elements['value']) values[device_id].append(elements['value'])
result = [(host, timestamps[host], values[host]) for host in host_list] result = [(host, timestamps[host], values[host]) for host in host_list]
......
...@@ -5,7 +5,7 @@ with open("README.md", "r") as fh: ...@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools.setup( setuptools.setup(
name="expetator", name="expetator",
version="0.1.4", version="0.1.7",
author="Georges Da Costa", author="Georges Da Costa",
author_email="georges.da-costa@irit.fr", author_email="georges.da-costa@irit.fr",
description="A framework for monitoring HPC applications using DVFS", description="A framework for monitoring HPC applications using DVFS",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment