From 4509e0973529a2804627faedfac5e434452bb6b3 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 25 Mar 2011 09:21:30 +0000 Subject: [PATCH] fixes-gaugering --- src/fs/gnunet-service-fs.h | 2 +- src/fs/test_fs_download.c | 9 +++++++++ src/fs/test_fs_download_data.conf | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/fs/gnunet-service-fs.h b/src/fs/gnunet-service-fs.h index c4a3d4bb9..f04d063f7 100644 --- a/src/fs/gnunet-service-fs.h +++ b/src/fs/gnunet-service-fs.h @@ -33,7 +33,7 @@ #include "gnunet_block_lib.h" #include "fs.h" -#define DEBUG_FS GNUNET_YES +#define DEBUG_FS GNUNET_NO /** diff --git a/src/fs/test_fs_download.c b/src/fs/test_fs_download.c index 969e83bf9..44e2cc48b 100644 --- a/src/fs/test_fs_download.c +++ b/src/fs/test_fs_download.c @@ -28,6 +28,7 @@ #include "gnunet_util_lib.h" #include "gnunet_arm_service.h" #include "gnunet_fs_service.h" +#include #define VERBOSE GNUNET_NO @@ -151,6 +152,10 @@ progress_cb (void *cls, case GNUNET_FS_STATUS_PUBLISH_COMPLETED: printf ("Publishing complete, %llu kbps.\n", (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL)); + GAUGER ("FS", + "Publishing speed", + (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL), + "kb/s"); fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst"); start = GNUNET_TIME_absolute_get (); download = GNUNET_FS_download_start (fs, @@ -168,6 +173,10 @@ progress_cb (void *cls, case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED: printf ("Download complete, %llu kbps.\n", (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL)); + GAUGER ("FS", + "Local download speed", + (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL), + "kb/s"); GNUNET_SCHEDULER_add_now (&abort_download_task, NULL); break; diff --git a/src/fs/test_fs_download_data.conf b/src/fs/test_fs_download_data.conf index 49389526d..0a7eb311a 100644 --- a/src/fs/test_fs_download_data.conf +++ b/src/fs/test_fs_download_data.conf @@ -37,7 +37,7 @@ HOSTNAME = localhost PORT = 42471 HOSTNAME = localhost ACTIVEMIGRATION = NO -DEBUG = YES +# DEBUG = YES #PREFIX = valgrind --tool=memcheck --leak-check=yes #BINARY = /home/grothoff/bin/gnunet-service-fs -- 2.25.1