mirror of
https://github.com/Telecominfraproject/wlan-cloud-analytics.git
synced 2025-11-02 19:37:54 +00:00
Fine tuning statistics.
This commit is contained in:
@@ -100,8 +100,8 @@ namespace OpenWifi {
|
||||
GetJSON("tx_power", radio, RTP.tx_power, (uint64_t) 0);
|
||||
GetJSON("active_ms", radio, RTP.active_ms, (uint64_t) 0);
|
||||
GetJSON("channel", radio, RTP.channel, (uint64_t) 0);
|
||||
GetJSON("temperature", radio, RTP.temperature, (int64_t) 0);
|
||||
GetJSON("noise", radio, RTP.noise, (int64_t) 0);
|
||||
GetJSON("temperature", radio, RTP.temperature, (int64_t) 20);
|
||||
GetJSON("noise", radio, RTP.noise, (int64_t) -100);
|
||||
DTP.radio_data.push_back(RTP);
|
||||
}
|
||||
}
|
||||
@@ -331,7 +331,7 @@ namespace OpenWifi {
|
||||
GetJSON("compatible", ping, DI_.deviceType, std::string{} );
|
||||
GetJSON("connectionIp", ping, DI_.connectionIp, std::string{} );
|
||||
GetJSON("locale", ping, DI_.locale, std::string{} );
|
||||
GetJSON("timestamp", ping, DI_.lastConnection, (uint64_t)0 );
|
||||
GetJSON("timestamp", ping, DI_.lastConnection, (uint64_t) OpenWifi::Now() );
|
||||
if (ping.contains("firmware")) {
|
||||
auto NewFirmware = ping["firmware"];
|
||||
if (NewFirmware != DI_.lastFirmware) {
|
||||
|
||||
@@ -191,6 +191,7 @@ namespace OpenWifi {
|
||||
AverageAPData(&AnalyticsObjects::APTimePoint::tx_errors_pct, point_list, DTPA.tx_errors_pct);
|
||||
|
||||
AverageRadioData(&AnalyticsObjects::RadioTimePoint::noise, point_list, DTPA.noise);
|
||||
AverageRadioData(&AnalyticsObjects::RadioTimePoint::temperature, point_list, DTPA.temperature);
|
||||
AverageRadioData(&AnalyticsObjects::RadioTimePoint::tx_power, point_list, DTPA.tx_power);
|
||||
AverageRadioData(&AnalyticsObjects::RadioTimePoint::active_pct, point_list, DTPA.active_pct);
|
||||
AverageRadioData(&AnalyticsObjects::RadioTimePoint::busy_pct, point_list, DTPA.busy_pct);
|
||||
|
||||
@@ -399,6 +399,7 @@ namespace OpenWifi::AnalyticsObjects {
|
||||
|
||||
void DeviceTimePointAnalysis::to_json(Poco::JSON::Object &Obj) const {
|
||||
field_to_json(Obj,"noise",noise);
|
||||
field_to_json(Obj,"temperature",temperature);
|
||||
field_to_json(Obj,"active_pct",active_pct);
|
||||
field_to_json(Obj,"busy_pct",busy_pct);
|
||||
field_to_json(Obj,"receive_pct",receive_pct);
|
||||
@@ -417,6 +418,7 @@ namespace OpenWifi::AnalyticsObjects {
|
||||
bool DeviceTimePointAnalysis::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||
try {
|
||||
field_from_json(Obj,"noise",noise);
|
||||
field_from_json(Obj,"temperature",temperature);
|
||||
field_from_json(Obj,"active_pct",active_pct);
|
||||
field_from_json(Obj,"busy_pct",busy_pct);
|
||||
field_from_json(Obj,"receive_pct",receive_pct);
|
||||
|
||||
@@ -281,6 +281,7 @@ namespace OpenWifi {
|
||||
uint64_t timestamp;
|
||||
|
||||
AveragePoint noise;
|
||||
AveragePoint temperature;
|
||||
AveragePoint active_pct;
|
||||
AveragePoint busy_pct;
|
||||
AveragePoint receive_pct;
|
||||
|
||||
@@ -251,7 +251,7 @@ boarddevices() {
|
||||
}
|
||||
|
||||
points() {
|
||||
curl ${FLAGS} -X GET "https://${OWANALYTICS}/api/v1/board/$1/timepoints" \
|
||||
curl ${FLAGS} -X GET "https://${OWANALYTICS}/api/v1/board/$1/timepoints?pointsStatsOnly=true" \
|
||||
-H "accept: application/json" \
|
||||
-H "Authorization: Bearer ${token}" > ${result_file}
|
||||
jq < ${result_file}
|
||||
|
||||
Reference in New Issue
Block a user