HSAnet / glimpse_client

GLIMPSE is an end host-based network measurement tool.
http://www.measure-it.net
Other
6 stars 6 forks source link

Ping results #314

Closed MKV21 closed 9 years ago

MKV21 commented 9 years ago
res.insert("round_trip_loss", (m_pingsSent - m_pingsReceived) / m_pingsSent);

There needs to be an integer cast.

Also I have found some problems with the ping results. Sometimes the repository receives values which are to big ("django.db.utils.DataError: integer out of range"). Could you add a check for this on the client side? I am not sure which value causes the error, but a quick check revealed for example that the round_trip_stdev was 9223372549499374 one time. round_trip_stdev is not an integer but this might also lead to problems.

monstermunchkin commented 9 years ago

No need for a cast since it's an integer division.

Could you please post the RTTs which were uploaded when the round_trip_stdev appeared to be 9223372549499374? Also, I don't understand why the supervisor should receive this value – which by the way is BigIntegerField's largest value – as round_trip_stdev is of the type qreal.

MKV21 commented 9 years ago

I meant a cast from integer to float, as all variables in the calculation are integers (which will lead to an integer result... don't we want the loss percentage here?).

Complete result:

{
          "duration": 3000,
          "post_info": {
            "tbm_active": false,
            "connection_mode": 5,
            "free_memory": 0,
            "used_mobile_traffic": 804,
            "used_traffic": 4904624,
            "available_traffic": 31457280,
            "signal_strength": 100,
            "available_disk_space": 965857280,
            "battery_level": -1,
            "cpu_usage": 0,
            "available_mobile_traffic": 20971520
          },
          "end_time": "2015-03-31T00:32:08",
          "start_time": "2015-03-31T00:32:05",
          "probe_result": {
            "round_trip_received": 1,
            "round_trip_loss": 0,
            "round_trip_sent": 3,
            "round_trip_ms": [
              "714.724",
              "1.84467e+16"
            ],
            "round_trip_max": "1.84467e+16",
            "round_trip_avg": "9.22337e+15",
            "round_trip_min": "714.724",
            "round_trip_stdev": 9223372549499374
          },
          "pre_info": {
            "tbm_active": false,
            "connection_mode": 5,
            "free_memory": 0,
            "used_mobile_traffic": 804,
            "used_traffic": 4904624,
            "available_traffic": 31457280,
            "signal_strength": 100,
            "available_disk_space": 965857280,
            "battery_level": -1,
            "cpu_usage": 0,
            "available_mobile_traffic": 20971520
          },
          "error": "",
          "measure_uuid": "00000000-0000-0000-0000-000000000000"
        }