From 74420f5f16712933f1d7bdfc7b7a22fd102bbef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arturo=20Filast=C3=B2?= Date: Mon, 19 Mar 2018 19:31:17 +0100 Subject: [PATCH] Go considers the default type of JSON float64 --- nettests/performance/ndt.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/nettests/performance/ndt.go b/nettests/performance/ndt.go index 082c245..0a53f77 100644 --- a/nettests/performance/ndt.go +++ b/nettests/performance/ndt.go @@ -36,16 +36,16 @@ func (n NDT) Summary(tk map[string]interface{}) interface{} { advanced := tk["advanced"].(map[string]interface{}) return NDTSummary{ - Upload: simple["upload"].(int64), - Download: simple["download"].(int64), - Ping: simple["ping"].(int64), - MaxRTT: advanced["max_rtt"].(int64), - AvgRTT: advanced["avg_rtt"].(int64), - MinRTT: advanced["min_rtt"].(int64), - MSS: advanced["mss"].(int64), - OutOfOrder: advanced["out_of_order"].(int64), + Upload: int64(simple["upload"].(float64)), + Download: int64(simple["download"].(float64)), + Ping: int64(simple["ping"].(float64)), + MaxRTT: int64(advanced["max_rtt"].(float64)), + AvgRTT: int64(advanced["avg_rtt"].(float64)), + MinRTT: int64(advanced["min_rtt"].(float64)), + MSS: int64(advanced["mss"].(float64)), + OutOfOrder: int64(advanced["out_of_order"].(float64)), PacketLoss: advanced["packet_loss"].(float64), - Timeouts: advanced["timeouts"].(int64), + Timeouts: int64(advanced["timeouts"].(float64)), } }