feat: export more networking data

This commit is contained in:
Daniel Langbein 2023-07-12 13:02:11 +02:00
parent aa1ac38d83
commit 3d70a95308

View File

@ -18,10 +18,16 @@ class NetworkLogger(Logger):
def export_data(self) -> Path:
data = self.get_all_datasets()
# This includes some duplicate data.
# The bare minimum would be
# - start time and duration in seconds
# - bytes sent and received
export_schema = [
'datetime#Date',
'float#Bytes sent per second',
'float#Bytes received per second',
'float#Bytes sent',
'float#Bytes received'
]
export_data = []
# Append all other rows.
@ -47,6 +53,10 @@ class NetworkLogger(Logger):
delta_sent / elapsed_seconds,
# float#Bytes received per second
delta_received / elapsed_seconds,
# float#Bytes sent
delta_sent,
# float#Bytes received
delta_received,
])
export_file = self.get_log_file().parent.joinpath(self.get_log_file().name + '.exported.csv')