selfprivacy.org.app/lib/logic/models/metrics.dart
NaiJi e20063a9ad chore: Remove unneeded metrics fields
PPS metrics aren't used in our charts
2022-11-12 22:44:15 +04:00

31 lines
648 B
Dart

class TimeSeriesData {
TimeSeriesData(
this.secondsSinceEpoch,
this.value,
);
final int secondsSinceEpoch;
DateTime get time =>
DateTime.fromMillisecondsSinceEpoch(secondsSinceEpoch * 1000);
final double value;
}
class ServerMetrics {
ServerMetrics({
required this.stepsInSecond,
required this.cpu,
required this.bandwidthIn,
required this.bandwidthOut,
required this.start,
required this.end,
});
final num stepsInSecond;
final List<TimeSeriesData> cpu;
final List<TimeSeriesData> bandwidthIn;
final List<TimeSeriesData> bandwidthOut;
final DateTime start;
final DateTime end;
}