[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 102/164: Some more tests
From: |
gnunet |
Subject: |
[gnunet] 102/164: Some more tests |
Date: |
Fri, 30 Jul 2021 15:32:48 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 846d200686d065644069117e75833ed423e60aad
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Wed May 19 00:41:38 2021 +0200
Some more tests
---
src/setu/gnunet-service-setu.c | 64 ++++++++++++++++++++++++++++++++++++++++--
src/setu/perf_setu_api.c | 12 +++-----
2 files changed, 65 insertions(+), 11 deletions(-)
diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index dc1ec04cc..ee1283de9 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -493,6 +493,16 @@ struct Operation
* Total size of local set
*/
uint64_t total_elements_size_local;
+
+ /**
+ * Practical limit of number of elements in set
+ */
+ uint64_t upper_element_boundary;
+
+ /**
+ * is
+ */
+ uint64_t number_received_full_elements;
};
@@ -806,8 +816,7 @@ load_config(struct Operation * op) {
setu_cfg = GNUNET_CONFIGURATION_create();
- GNUNET_CONFIGURATION_load(setu_cfg,"/tmp/perf_setu.conf");
-
+ GNUNET_CONFIGURATION_load(setu_cfg,"perf_setu.conf");
long long number;
float fl;
@@ -823,6 +832,9 @@ load_config(struct Operation * op) {
GNUNET_CONFIGURATION_get_value_float(setu_cfg,"PERFORMANCE",
"MAX_SET_DIFF_FACTOR_DIFFERENTIAL", &fl);
op->max_set_diff_factor_diff_sync = fl;
+ GNUNET_CONFIGURATION_get_value_number(setu_cfg,"BOUNDARIES",
"UPPER_ELEMENT", &number);
+ op->upper_element_boundary = number;
+
op->peer_site = 0;
op->active_passive_switches = 0;
}
@@ -1095,6 +1107,33 @@ is_message_in_message_control_flow(struct
GNUNET_CONTAINER_MultiHashMap *hash_ma
}
+/**
+ * Iterator for determinating if all demands have been
+ * satisfied
+ *
+ * @param cls the union operation `struct Operation *`
+ * @param key unused
+ * @param value the `struct ElementEntry *` to insert
+ * into the key-to-element mapping
+ * @return #GNUNET_YES (to continue iterating)
+ */
+static int
+determinate_done_message_iterator (void *cls,
+ const struct GNUNET_HashCode *key,
+ void *value)
+{
+ struct Operation *op = cls;
+ struct message_control_flow_element *mcfe = value;
+
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ "MAP FOUND: %u, %u, %u\n", mcfe->demand, mcfe->offer, mcfe->element);
+
+ if((mcfe->demand == MESSAGE_SENT || mcfe->demand == MESSAGE_RECEIVED)) {
+ return GNUNET_YES;
+ }
+ return GNUNET_NO;
+}
+
/**
* Iterator for determining average size
*
@@ -1906,6 +1945,16 @@ handle_union_p2p_strata_estimator (void *cls,
len = ntohs (msg->header.size) - sizeof(struct StrataEstimatorMessage);
other_size = GNUNET_ntohll (msg->set_size);
op->remote_element_count = other_size;
+
+ if(op->upper_element_boundary < op->remote_element_count) {
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ "Exceeded configured upper bound <%lu> of element: %u\n",
+ op->upper_element_boundary,
+ op->remote_element_count);
+ fail_union_operation (op);
+ return;
+ }
+
remote_se = strata_estimator_create (SE_STRATA_COUNT,
SE_IBF_SIZE,
SE_IBF_HASH_NUM);
@@ -1930,6 +1979,8 @@ handle_union_p2p_strata_estimator (void *cls,
diff = strata_estimator_difference (remote_se,
op->se);
+
+
/* Calculate remote local diff */
int remote_elements_decoded = remote_se->strata[0]->remote_decoded_count;
int local_elements_decoded = remote_se->strata[0]->local_decoded_count;
@@ -2223,7 +2274,14 @@ decode_and_send (struct Operation *op)
if ((GNUNET_SYSERR == res) ||
(GNUNET_YES == cycle_detected))
{
- uint32_t next_size;
+
+ /** LOG FAILURE POINT **/
+ FILE *out1 = fopen("when_decoding_failed.csv", "a");
+ fprintf(out1, "%d\n", num_decoded);
+ fclose(out1);
+
+
+ uint32_t next_size;
/** Enforce odd ibf size **/
next_size = get_next_ibf_size(op->ibf_bucket_number_factor, num_decoded,
diff_ibf->size);
diff --git a/src/setu/perf_setu_api.c b/src/setu/perf_setu_api.c
index 03ef0a652..ac02239df 100644
--- a/src/setu/perf_setu_api.c
+++ b/src/setu/perf_setu_api.c
@@ -404,7 +404,7 @@ run (void *cls,
"Running real set-reconciliation\n");
//init_set1 ();
// limit ~23800 element total
- initRandomSets(490, 500,500,32);
+ initRandomSets(2900, 3000,3000,32);
}
void perf_thread() {
@@ -425,10 +425,6 @@ static void run_petf_thread(int total_runs) {
//Father code (before child processes start)
for (int processed = 0; processed < total_runs;) {
for (int id = 0; id < core_count; id++) {
- perf_thread();
- processed += 1;
- }
- /**
if(processed >= total_runs) break;
if ((child_pid = fork()) == 0) {
@@ -438,7 +434,6 @@ static void run_petf_thread(int total_runs) {
processed += 1;
}
while ((wpid = wait(&status)) > 0);
- **/
}
}
@@ -474,14 +469,15 @@ static void execute_perf() {
GNUNET_CONFIGURATION_set_value_string(setu_cfg, "PERFORMANCE",
"TRADEOFF", tradeoff); //default=0.25
GNUNET_CONFIGURATION_set_value_string(setu_cfg, "PERFORMANCE",
"MAX_SET_DIFF_FACTOR_DIFFERENTIAL",
"20000");//default=0.25
+ GNUNET_CONFIGURATION_set_value_number(setu_cfg, "BOUNDARIES",
"UPPER_ELEMENT",5000);
- if (GNUNET_OK != GNUNET_CONFIGURATION_write(setu_cfg,
"/tmp/perf_setu.conf"))
+ if (GNUNET_OK != GNUNET_CONFIGURATION_write(setu_cfg,
"perf_setu.conf"))
GNUNET_log(
GNUNET_ERROR_TYPE_ERROR,
_("Failed to write subsystem default identifier map to
`%s'.\n"),
setu_cfg);
- run_petf_thread(10000);
+ run_petf_thread(100000);
}
}
return 0;
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] 107/164: Increased shufle nonce to 64bit, (continued)
- [gnunet] 107/164: Increased shufle nonce to 64bit, gnunet, 2021/07/30
- [gnunet] 96/164: Perftest, gnunet, 2021/07/30
- [gnunet] 99/164: Securyt improvement prevent peer from receiving message in wrong phase, gnunet, 2021/07/30
- [gnunet] 90/164: Perftest, gnunet, 2021/07/30
- [gnunet] 120/164: Added checks for byzantine bounds, gnunet, 2021/07/30
- [gnunet] 88/164: Perf test, gnunet, 2021/07/30
- [gnunet] 116/164: Prepare fore messurement 2, gnunet, 2021/07/30
- [gnunet] 132/164: Removed Operation type from Operation Request message not required anymore, gnunet, 2021/07/30
- [gnunet] 136/164: Fixed some more errors from review, gnunet, 2021/07/30
- [gnunet] 112/164: Baseline for salt optimization, gnunet, 2021/07/30
- [gnunet] 102/164: Some more tests,
gnunet <=
- [gnunet] 106/164: Added configuration new configration options as api options fixes memory leak, gnunet, 2021/07/30
- [gnunet] 105/164: Added randum seed for randum map, gnunet, 2021/07/30
- [gnunet] 104/164: Added full send commit message + changes request full message, gnunet, 2021/07/30
- [gnunet] 121/164: Made SE vary sizes depending on new formula, gnunet, 2021/07/30
- [gnunet] 129/164: Fixed some warnings, gnunet, 2021/07/30
- [gnunet] 131/164: Fixed all warnings/notices for gcc and clang, gnunet, 2021/07/30
- [gnunet] 103/164: Fixed some phase stuff and shuffle full sending elements, gnunet, 2021/07/30
- [gnunet] 123/164: Disable performance messurement, gnunet, 2021/07/30
- [gnunet] 111/164: Improved IBF with salt + prime ibf size, gnunet, 2021/07/30
- [gnunet] 128/164: Added some more comment, gnunet, 2021/07/30