summaryrefslogtreecommitdiff
path: root/src/setu/perf_setu_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/setu/perf_setu_api.c')
-rw-r--r--src/setu/perf_setu_api.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/setu/perf_setu_api.c b/src/setu/perf_setu_api.c
index 73b61c02a..60a5e5e85 100644
--- a/src/setu/perf_setu_api.c
+++ b/src/setu/perf_setu_api.c
@@ -212,7 +212,7 @@ init_set2 (void *cls)
unsigned char *gen_rdm_bytestream (size_t num_bytes)
{
unsigned char *stream = GNUNET_malloc (num_bytes);
- GNUNET_CRYPTO_random_block(GNUNET_CRYPTO_QUALITY_WEAK, stream, sizeof(stream));
+ GNUNET_CRYPTO_random_block(GNUNET_CRYPTO_QUALITY_WEAK, stream, num_bytes);
return stream;
}
@@ -229,7 +229,7 @@ initRandomSets(int overlap, int set1_size, int set2_size, int element_size_in_by
// Add elements to both sets
for (int i = 0; i < overlap; i++) {
element.data = gen_rdm_bytestream(element_size_in_bytes);
- element.size = strlen (element.data);
+ element.size = element_size_in_bytes;
GNUNET_SETU_add_element (set1, &element, NULL, NULL);
GNUNET_SETU_add_element (set2, &element, NULL, NULL);
set1_size--;
@@ -240,7 +240,7 @@ initRandomSets(int overlap, int set1_size, int set2_size, int element_size_in_by
// Add other elements to set 1
while(set1_size>0) {
element.data = gen_rdm_bytestream(element_size_in_bytes);
- element.size = strlen (element.data);
+ element.size = element_size_in_bytes;
GNUNET_SETU_add_element (set1, &element, NULL, NULL);
set1_size--;
}
@@ -249,7 +249,7 @@ initRandomSets(int overlap, int set1_size, int set2_size, int element_size_in_by
// Add other elements to set 2
while(set2_size > 0) {
element.data = gen_rdm_bytestream(element_size_in_bytes);
- element.size = strlen (element.data);
+ element.size = element_size_in_bytes;
if(set2_size != 1) {
GNUNET_SETU_add_element (set2, &element,NULL, NULL);
@@ -395,7 +395,7 @@ run (void *cls,
"Running real set-reconciliation\n");
//init_set1 ();
// limit ~23800 element total
- initRandomSets(88,100,90,32);
+ initRandomSets(99,100,100,64);
}
static void execute_perf()