[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 148/164: Override some stuff for performance messurement
From: |
gnunet |
Subject: |
[gnunet] 148/164: Override some stuff for performance messurement |
Date: |
Fri, 30 Jul 2021 15:33:34 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit d115be5a5d2c96f165f9ea037373f856c633ac9d
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Thu Jun 10 02:02:35 2021 +0200
Override some stuff for performance messurement
---
src/setu/gnunet-service-setu.c | 35 +++++++++++++++++++----------------
src/setu/perf_setu_api.c | 2 +-
2 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index 18cf990fa..ea3efe1ed 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -105,7 +105,7 @@
* Measure the performance in a csv
*/
-#define MEASURE_PERFORMANCE 0
+#define MEASURE_PERFORMANCE 1
/**
@@ -870,7 +870,6 @@ load_config (struct Operation *op)
op->peer_site = 0;
- op->active_passive_switches = 0;
}
@@ -945,7 +944,7 @@ calculate_perf_store ()
GNUNET_SETU_ElementMessage),
perf_store.element);
// bytes_transmitted +=
sum_sent_received_bytes(sizeof(GNUNET_MESSAGE_TYPE_SETU_P2P_OPERATION_REQUEST),
perf_store.operation_request);
- bytes_transmitted += sum_sent_received_bytes (sizeof(StrataEstimatorMessage),
+ bytes_transmitted += sum_sent_received_bytes (sizeof(struct
StrataEstimatorMessage),
perf_store.se);
bytes_transmitted += sum_sent_received_bytes (4, perf_store.full_done);
bytes_transmitted += sum_sent_received_bytes (sizeof(struct IBFMessage),
@@ -1012,6 +1011,7 @@ estimate_best_mode_of_operation (uint64_t
avg_element_size,
uint64_t ibf_bucket_number_factor)
{
+ return DIFFERENTIAL_SYNC;
/*
* In case of initial sync fall to predefined states
*/
@@ -1182,10 +1182,26 @@ update_message_control_flow (struct
GNUNET_CONTAINER_MultiHashMap *hash_map,
enum MESSAGE_CONTROL_FLOW_STATE *mcfs;
cfe = GNUNET_CONTAINER_multihashmap_get (hash_map, hash_code);
+ if((ELEMENT_MESSAGE == mt) && (cfe != NULL)) {
+ if ((new_mcfs != MSG_CFS_SENT) && (MSG_CFS_RECEIVED != cfe->offer))
+ {
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ "Received an element without sent offer!\n");
+ return GNUNET_NO;
+ }
+ /* Check that only requested elements are received! */
+ if ((ELEMENT_MESSAGE == mt) && (new_mcfs != MSG_CFS_SENT) &&
(cfe->demand != MSG_CFS_SENT)) {
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ "Received an element that was not demanded\n");
+ return GNUNET_NO;
+ }
+ }
+
if (NULL == cfe)
{
cfe = GNUNET_new (struct messageControlFlowElement);
}
+
if (OFFER_MESSAGE == mt)
{
mcfs = &cfe->offer;
@@ -1197,19 +1213,6 @@ update_message_control_flow (struct
GNUNET_CONTAINER_MultiHashMap *hash_map,
else if (ELEMENT_MESSAGE == mt)
{
mcfs = &cfe->element;
- if ((new_mcfs != MSG_CFS_SENT) && (MSG_CFS_RECEIVED != cfe->offer) )
- {
- LOG (GNUNET_ERROR_TYPE_ERROR,
- "Received an element without sent offer!\n");
- return GNUNET_NO;
- }
- /* Check that only requested elements are received! */
- if ((new_mcfs != MSG_CFS_SENT) && (cfe->demand != MSG_CFS_SENT) )
- {
- LOG (GNUNET_ERROR_TYPE_ERROR,
- "Received an element that was not demanded\n");
- return GNUNET_NO;
- }
}
else
{
diff --git a/src/setu/perf_setu_api.c b/src/setu/perf_setu_api.c
index 345dbe452..18247c531 100644
--- a/src/setu/perf_setu_api.c
+++ b/src/setu/perf_setu_api.c
@@ -452,7 +452,7 @@ execute_perf ()
GNUNET_log (
GNUNET_ERROR_TYPE_ERROR,
_ ("Failed to write subsystem default identifier map'.\n"));
- run_petf_thread (100);
+ run_petf_thread (10000000);
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] 145/164: Return early from function, (continued)
- [gnunet] 145/164: Return early from function, gnunet, 2021/07/30
- [gnunet] 151/164: Fixed some bugs in implementation, gnunet, 2021/07/30
- [gnunet] 156/164: Added check to enforce active passive switch when inquiry colision occour, gnunet, 2021/07/30
- [gnunet] 155/164: Fixed implementaion, gnunet, 2021/07/30
- [gnunet] 115/164: Prepare fore messurement 1, gnunet, 2021/07/30
- [gnunet] 118/164: Prepare fore messurement 8, gnunet, 2021/07/30
- [gnunet] 141/164: Does this fix the mem leak, gnunet, 2021/07/30
- [gnunet] 114/164: Added probabilistic security check for full sync, gnunet, 2021/07/30
- [gnunet] 140/164: Fixed wrong place for null check, gnunet, 2021/07/30
- [gnunet] 137/164: Fixed one more, gnunet, 2021/07/30
- [gnunet] 148/164: Override some stuff for performance messurement,
gnunet <=
- [gnunet] 147/164: Fixed some stuff, gnunet, 2021/07/30
- [gnunet] 160/164: Fixed some stuff, gnunet, 2021/07/30
- [gnunet] 163/164: Added some more comments, gnunet, 2021/07/30
- [gnunet] 164/164: completing rebase to master, gnunet, 2021/07/30
- [gnunet] 138/164: Fixed one more, gnunet, 2021/07/30
- [gnunet] 135/164: Made perf compleate in time, gnunet, 2021/07/30
- [gnunet] 146/164: Added comment to explain |1, gnunet, 2021/07/30
- [gnunet] 153/164: Fixed another bug in message flow control, gnunet, 2021/07/30
- [gnunet] 154/164: Use GNUNET_free instead of build in free, gnunet, 2021/07/30
- [gnunet] 159/164: removed exponation from plausability check FIX, gnunet, 2021/07/30