extern int verbose;
-static void show_malloc_stats(void);
-
/****************************************************************************
wait for a process to exit, calling io_flush while waiting
****************************************************************************/
**/
static void report(int f)
{
- time_t t = time(NULL);
extern int am_server;
extern int am_sender;
extern int am_daemon;
show_mem_stats();
show_flist_stats();
show_file_stats();
+ show_net_stats();
+ show_time_stats();
}
if (verbose || do_stats) {
- rprintf(FINFO,"wrote %.0f bytes read %.0f bytes %.2f bytes/sec\n",
- (double)stats.total_written,
- (double)stats.total_read,
- (stats.total_written+stats.total_read)/(0.5 + (t-starttime)));
rprintf(FINFO,"total size is %.0f speedup is %.2f\n",
(double)stats.total_size,
(1.0*stats.total_size)/(stats.total_written+stats.total_read));
extern struct stats stats;
rprintf(FINFO, "Memory usage:\n"
- " %10ld bytes file_list\n"
- " %10ld bytes flist_size\n"
- " %10ld bytes hlink_list\n"
- " %10ld bytes file_structs (and associated data)\n"
- " %10ld bytes string_areas\n"
- " %10ld bytes exclude_structs\n"
- " %10ld bytes map_structs\n"
- " %10ld bytes tags\n"
- " %10ld bytes delete_list\n"
+ " %10s\n"
+ " %10ld file_list\n"
+ " %10ld flist_size\n"
+ " %10ld hlink_list\n"
+ " %10ld file_structs (and associated data)\n"
+ " %10ld string_areas\n"
+ " %10ld exclude_structs\n"
+ " %10ld map_structs\n"
+ " %10ld tags\n"
+ " %10ld delete_list\n"
,
+ "bytes",
(long) stats.main_flist,
(long) stats.flist_size,
(long) stats.hlink_list,
#include "rsync.h"
-void show_file_stats()
+extern time_t starttime;
+
+void show_file_stats(void)
{
extern struct stats stats;
(double)stats.literal_data,
(double)stats.matched_data,
"?", "?", "?", "?");
+}
+
- rprintf(FINFO, "Network statistics\n");
-
- rprintf(FINFO,"Total bytes written: %.0f\n",
- (double)stats.total_written);
- rprintf(FINFO,"Total bytes read: %.0f\n\n",
- (double)stats.total_read);
-}
+void show_net_stats(void)
+{
+ time_t t = time(NULL);
+ rprintf(FINFO, "Network statistics\n"
+ " %10s %10s %10s\n"
+ " %10.0f %10.0f %10.2f total bytes\n"
+ ,
+ "read", "write", "bytes/s",
+ (double) stats.total_read,
+ (double) stats.total_written,
+ (stats.total_written+stats.total_read)/(0.5 + (t-starttime)));
+}
+
+
+void show_time_stats(void)
+{
+}