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

No commit message

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