From 3d70a95308f737c54fc87f67214584d0f5b77d24 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Wed, 12 Jul 2023 13:02:11 +0200 Subject: [PATCH] feat: export more networking data --- src/de/p1st/monitor/loggers/network.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/de/p1st/monitor/loggers/network.py b/src/de/p1st/monitor/loggers/network.py index a6eade5..acc95d1 100644 --- a/src/de/p1st/monitor/loggers/network.py +++ b/src/de/p1st/monitor/loggers/network.py @@ -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')