From 3f03ff0525f81e7b9c6cdc73f5c8983c58350bb1 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Sun, 1 May 2016 11:06:41 +0300 Subject: undo precision changes --- src/main_dpdk.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/main_dpdk.cpp') diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index 6eca5775..1496513d 100644 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -2335,10 +2335,7 @@ private: std::string CGlobalStats::get_field(std::string name,float &f){ char buff[200]; - if(f >= 10 || f <= -10) - snprintf(buff, sizeof(buff), "\"%s\":%.1f,",name.c_str(),f); - else - snprintf(buff, sizeof(buff), "\"%s\":%.3e,",name.c_str(),f); + snprintf(buff, sizeof(buff), "\"%s\":%.1f,",name.c_str(),f); return (std::string(buff)); } @@ -2350,10 +2347,7 @@ std::string CGlobalStats::get_field(std::string name,uint64_t &f){ std::string CGlobalStats::get_field_port(int port,std::string name,float &f){ char buff[200]; - if(f >= 10 || f <= -10) - snprintf(buff, sizeof(buff), "\"%s-%d\":%.1f,",name.c_str(),port,f); - else - snprintf(buff, sizeof(buff), "\"%s-%d\":%.3e,",name.c_str(),port,f); + snprintf(buff, sizeof(buff), "\"%s-%d\":%.1f,",name.c_str(),port,f); return (std::string(buff)); } -- cgit 1.2.3-korg