updating fetch_metrics for constants changes
@@ -6,9 +6,6 @@ import time
from fio import fio_metrics
from vm_metrics import vm_metrics
-START_TIME = 'start_time'
-END_TIME = 'end_time'
-RW = 'rw'
INSTANCE = socket.gethostname()
PERIOD = 120
@@ -31,9 +28,10 @@ if __name__ == '__main__':
vm_metrics_obj = vm_metrics.VmMetrics()
# Getting VM metrics for every job
for ind, job in enumerate(temp):
- start_time_sec = job[START_TIME]
- end_time_sec = job[END_TIME]
- rw = job[RW]
+ print(job)
+ start_time_sec = job[fio_metrics.consts.START_TIME]
+ end_time_sec = job[fio_metrics.consts.END_TIME]
+ rw = job[fio_metrics.consts.PARAMS][fio_metrics.consts.RW]
print(f'Getting VM metrics for job at index {ind+1}...')
vm_metrics_obj.fetch_metrics_and_write_to_google_sheet(
start_time_sec, end_time_sec, INSTANCE, PERIOD, rw)
