summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostyantyn Ovechko <fastinetserver@gmail.com>2010-06-27 17:56:20 +0300
committerKostyantyn Ovechko <fastinetserver@gmail.com>2010-06-27 17:56:20 +0300
commit193cefd8d5eb3cf927244f280d682d4fda673210 (patch)
treee223d8ad6284c61324f44e85fcc8418d89efc1fa
parentFailprove tui.cpp and log errors to error.log (diff)
downloadidfetch-193cefd8d5eb3cf927244f280d682d4fda673210.tar.gz
idfetch-193cefd8d5eb3cf927244f280d682d4fda673210.tar.bz2
idfetch-193cefd8d5eb3cf927244f280d682d4fda673210.zip
Failprove stats.cpp and log errors to error.log
-rw-r--r--segget/stats.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/segget/stats.cpp b/segget/stats.cpp
index 8374eb8..fd87836 100644
--- a/segget/stats.cpp
+++ b/segget/stats.cpp
@@ -24,14 +24,20 @@ class Tstats{
};
void Tstats::show_totals(){
- msg_total("Total"
- +field(" PKGs:", pkg_count,4)
- +field(" = DFs:", dld_distfiles_count,4)
- +field(" / ", distfiles_count,4)
- +field(" = Size:", dld_size/1000,7)
- +field(" / ", total_size/1000,7)+" Kb "
- +field(" = ", dld_size*100/total_size,3)+"%%"
- +field(" Total speed: ", (total_bytes_per_last_interval/1000/(1+last_time_interval)),7)+" Kb/s");
+ try{
+ msg_total("Total"
+ +field(" PKGs:", pkg_count,4)
+ +field(" = DFs:", dld_distfiles_count,4)
+ +field(" / ", distfiles_count,4)
+ +field(" = Size:", dld_size/1000,7)
+ +field(" / ", total_size/1000,7)+" Kb "
+ +field(" = ", dld_size*100/total_size,3)+"%%"
+ +field(" Total speed: ", (total_bytes_per_last_interval/1000/(1+last_time_interval)),7)+" Kb/s");
+ }
+ catch(...)
+ {
+ error_log_no_msg("Error in stats.cpp: show_totals()");
+ }
}
Tstats stats;