aboutsummaryrefslogtreecommitdiff
path: root/src/fs/test_fs_download.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-03-25 09:21:30 +0000
committerChristian Grothoff <christian@grothoff.org>2011-03-25 09:21:30 +0000
commit4509e0973529a2804627faedfac5e434452bb6b3 (patch)
tree0a5c5bccfb82500b54365689a3186d903af92c51 /src/fs/test_fs_download.c
parent390a68296dd89f61461bdca02060d36e2e02af2b (diff)
downloadgnunet-4509e0973529a2804627faedfac5e434452bb6b3.tar.gz
gnunet-4509e0973529a2804627faedfac5e434452bb6b3.zip
fixes-gaugering
Diffstat (limited to 'src/fs/test_fs_download.c')
-rw-r--r--src/fs/test_fs_download.c9
1 files changed, 9 insertions, 0 deletions
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 @@
28#include "gnunet_util_lib.h" 28#include "gnunet_util_lib.h"
29#include "gnunet_arm_service.h" 29#include "gnunet_arm_service.h"
30#include "gnunet_fs_service.h" 30#include "gnunet_fs_service.h"
31#include <gauger.h>
31 32
32#define VERBOSE GNUNET_NO 33#define VERBOSE GNUNET_NO
33 34
@@ -151,6 +152,10 @@ progress_cb (void *cls,
151 case GNUNET_FS_STATUS_PUBLISH_COMPLETED: 152 case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
152 printf ("Publishing complete, %llu kbps.\n", 153 printf ("Publishing complete, %llu kbps.\n",
153 (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL)); 154 (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL));
155 GAUGER ("FS",
156 "Publishing speed",
157 (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL),
158 "kb/s");
154 fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst"); 159 fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
155 start = GNUNET_TIME_absolute_get (); 160 start = GNUNET_TIME_absolute_get ();
156 download = GNUNET_FS_download_start (fs, 161 download = GNUNET_FS_download_start (fs,
@@ -168,6 +173,10 @@ progress_cb (void *cls,
168 case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED: 173 case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
169 printf ("Download complete, %llu kbps.\n", 174 printf ("Download complete, %llu kbps.\n",
170 (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL)); 175 (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL));
176 GAUGER ("FS",
177 "Local download speed",
178 (unsigned long long) (FILESIZE * 1000LL / (1+GNUNET_TIME_absolute_get_duration (start).rel_value) / 1024LL),
179 "kb/s");
171 GNUNET_SCHEDULER_add_now (&abort_download_task, 180 GNUNET_SCHEDULER_add_now (&abort_download_task,
172 NULL); 181 NULL);
173 break; 182 break;