summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-05-01 11:06:41 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-05-01 11:06:41 +0300
commit3f03ff0525f81e7b9c6cdc73f5c8983c58350bb1 (patch)
treefaac2ed56c4d5487105026a284436ff7b0c21766 /src
parentfcd61b1c9b39cec1ac40eddec24c1d206780d38d (diff)
undo precision changes
Diffstat (limited to 'src')
-rw-r--r--src/main_dpdk.cpp10
1 files changed, 2 insertions, 8 deletions
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));
}