mirror of
https://codeberg.org/privacy1st/de-p1st-monitor
synced 2024-11-21 19:33:18 +01:00
feat: export more networking data
This commit is contained in:
parent
aa1ac38d83
commit
3d70a95308
@ -18,10 +18,16 @@ class NetworkLogger(Logger):
|
|||||||
def export_data(self) -> Path:
|
def export_data(self) -> Path:
|
||||||
data = self.get_all_datasets()
|
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 = [
|
export_schema = [
|
||||||
'datetime#Date',
|
'datetime#Date',
|
||||||
'float#Bytes sent per second',
|
'float#Bytes sent per second',
|
||||||
'float#Bytes received per second',
|
'float#Bytes received per second',
|
||||||
|
'float#Bytes sent',
|
||||||
|
'float#Bytes received'
|
||||||
]
|
]
|
||||||
export_data = []
|
export_data = []
|
||||||
# Append all other rows.
|
# Append all other rows.
|
||||||
@ -47,6 +53,10 @@ class NetworkLogger(Logger):
|
|||||||
delta_sent / elapsed_seconds,
|
delta_sent / elapsed_seconds,
|
||||||
# float#Bytes received per second
|
# float#Bytes received per second
|
||||||
delta_received / elapsed_seconds,
|
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')
|
export_file = self.get_log_file().parent.joinpath(self.get_log_file().name + '.exported.csv')
|
||||||
|
Loading…
Reference in New Issue
Block a user