# # patch "netsync.cc" # from [98bb94f9c22a40bc6f826cad62737a7f9bfb9a04] # to [04871c9d35e04f3f8ed0d10c6311c643c5f79df1] # # patch "ui.cc" # from [514ce4b3f2f24fea273f487657ef4698c6590c09] # to [f0e2ff249a83fa8a210f961d773ca560bb281592] # # patch "ui.hh" # from [b86e734da775c81b1ce9da3ca197456d3f077297] # to [7cdd4335a8fa4b4828470eb69b363792bd0a5ce8] # --- netsync.cc +++ netsync.cc @@ -2897,8 +2897,8 @@ session sess(role, client_voice, collections, all_collections, app, address(), server.get_socketfd(), timeout); - sess.byte_in_ticker.reset(new ticker("bytes in", ">", 1024, true)); - sess.byte_out_ticker.reset(new ticker("bytes out", "<", 1024, true)); + sess.byte_in_ticker.reset(new ticker("bytes in", ">", 256, true)); + sess.byte_out_ticker.reset(new ticker("bytes out", "<", 256, true)); if (role == sink_role) { sess.cert_in_ticker.reset(new ticker("certs in", "c", 3)); --- ui.cc +++ ui.cc @@ -84,28 +84,15 @@ i != ui.tickers.end(); ++i) { string suffix; - ostringstream disptick; - if (i->second->kilocount) - { // automatic unit conversion is enabled - float div; - if (i->second->ticks >= 1048576) { - // ticks >=1MB, use Mb - div = 1048576; - suffix = "M"; - } else { - // ticks <1MB, use kb - div = 1024; - suffix = "k"; - } - disptick << std::fixed << std::setprecision(1) << - (i->second->ticks / div); - } else { - // no automatic unit conversion. - disptick << i->second->ticks; + int div = 1; + if (i->second->kilocount && i->second->ticks >= 10000) + { + div = 1024; + suffix = "k"; } tickline += string(" [") - + i->first + ": " + disptick.str() + + i->first + ": " + lexical_cast(i->second->ticks / div) + suffix + "]"; } --- ui.hh +++ ui.hh @@ -13,7 +13,6 @@ #include #include #include -#include #include struct user_interface;