my $in_prefix = "K";
my $out_prefix = "K";
if ( $in_traffic > 1024 ) {
$in_traffic = sprintf( "%.2f", $in_traffic / 1024 );
$in_prefix = "M";
}
if ( $out_traffic > 1024 ) {
$out_traffic = sprintf( "%.2f", $out_traffic / 1024 );
$out_prefix = "M";
}
if ( $in_traffic > 1024 * 1024 ) {
$in_traffic = sprintf( "%.2f", $in_traffic / 1024 * 1024 );
$in_prefix = "G";
}
if ( $out_traffic > 1024 * 1024 ) {
$out_traffic = sprintf( "%.2f",$out_traffic / 1024 * 1024 );
$out_prefix = "G";
}
Replies to Untitled
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"text\/x-go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"mysql","xml":"xml","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","ecmascript":"javascript","groovy":"text\/x-groovy","haskell":"text\/x-haskell","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mysql":"mysql","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"plsql","properties":"text\/x-properties","scheme":"text\/x-scheme","vb":"text\/vbscript","vbnet":"text\/vbscript","verilog":"text\/x-verilog","yaml":"text\/x-yaml"}