add uploaderState (#179)

* add uploaderState

* add time

* float
This commit is contained in:
Adeeb Shihadeh
2021-07-13 17:07:16 -07:00
committed by GitHub
parent 95d7c94852
commit b87d81bfaa
2 changed files with 14 additions and 0 deletions

View File

@@ -1350,6 +1350,18 @@ struct ManagerState {
}
}
struct UploaderState {
immediateQueueSize @0 :UInt32;
immediateQueueCount @1 :UInt32;
rawQueueSize @2 :UInt32;
rawQueueCount @3 :UInt32;
# stats for last successfully uploaded file
lastTime @4 :Float32; # s
lastSpeed @5 :Float32; # MB/s
lastFilename @6 :Text;
}
struct Event {
logMonoTime @0 :UInt64; # nanoseconds
valid @67 :Bool = true;
@@ -1400,6 +1412,7 @@ struct Event {
# systems stuff
androidLog @20 :AndroidLogEntry;
managerState @78 :ManagerState;
uploaderState @79 :UploaderState;
procLog @33 :ProcLog;
clocks @35 :Clocks;
deviceState @6 :DeviceState;

View File

@@ -60,6 +60,7 @@ services = {
"wideRoadCameraState": (True, 20., 20),
"modelV2": (True, 20., 40),
"managerState": (True, 2., 1),
"uploaderState": (True, 0., 1),
}
service_list = {name: Service(new_port(idx), *vals) for # type: ignore
idx, (name, vals) in enumerate(services.items())}