aboutsummaryrefslogtreecommitdiff
path: root/src/fs
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
parent390a68296dd89f61461bdca02060d36e2e02af2b (diff)
downloadgnunet-4509e0973529a2804627faedfac5e434452bb6b3.tar.gz
gnunet-4509e0973529a2804627faedfac5e434452bb6b3.zip
fixes-gaugering
Diffstat (limited to 'src/fs')
-rw-r--r--src/fs/gnunet-service-fs.h2
-rw-r--r--src/fs/test_fs_download.c9
-rw-r--r--src/fs/test_fs_download_data.conf2
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 @@
33#include "gnunet_block_lib.h" 33#include "gnunet_block_lib.h"
34#include "fs.h" 34#include "fs.h"
35 35
36#define DEBUG_FS GNUNET_YES 36#define DEBUG_FS GNUNET_NO
37 37
38 38
39/** 39/**
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;
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
37PORT = 42471 37PORT = 42471
38HOSTNAME = localhost 38HOSTNAME = localhost
39ACTIVEMIGRATION = NO 39ACTIVEMIGRATION = NO
40DEBUG = YES 40# DEBUG = YES
41#PREFIX = valgrind --tool=memcheck --leak-check=yes 41#PREFIX = valgrind --tool=memcheck --leak-check=yes
42#BINARY = /home/grothoff/bin/gnunet-service-fs 42#BINARY = /home/grothoff/bin/gnunet-service-fs
43 43