Skip to content
Snippets Groups Projects
Commit 10bf1613 authored by Reinier van der Walle's avatar Reinier van der Walle
Browse files

No commit message

No commit message
parent 4d2587a9
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,6 @@ import cPickle as pickle
import time
from commands import getstatusoutput
import read_datarates
from decimal import *
##let's set up some constants
HOST = '' #we are the host
PORT = 44330 #arbitrary port not currently in use
......@@ -32,10 +31,9 @@ def calc_datarates_Gbps(exec_time):
t0 = time.time()
datarates_dict = datarate.get_data_rates()
devide_time = time.time() - t0 + exec_time
getcontext().prec = 9
for key in datarates_dict.keys():
try:
datarates_dict[key] = Decimal(datarates_dict[key] / devide_time * 8 / 1000000000)
datarates_dict[key] = round(datarates_dict[key] / devide_time * 8 / 1000000000, 9)
except:
datarates_dict[key] = None
return datarates_dict
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment