aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cadet/gnunet-service-cadet-new_core.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cadet/gnunet-service-cadet-new_core.c b/src/cadet/gnunet-service-cadet-new_core.c
index 24b58982d..41b569cba 100644
--- a/src/cadet/gnunet-service-cadet-new_core.c
+++ b/src/cadet/gnunet-service-cadet-new_core.c
@@ -307,6 +307,10 @@ discard_buffer (struct RouteDirection *dir,
307 cur_buffers--; 307 cur_buffers--;
308 GNUNET_MQ_discard (env); 308 GNUNET_MQ_discard (env);
309 lower_rung (dir); 309 lower_rung (dir);
310 GNUNET_STATISTICS_set (stats,
311 "# buffer use",
312 cur_buffers,
313 GNUNET_NO);
310} 314}
311 315
312 316
@@ -452,6 +456,10 @@ route_message (struct CadetPeer *prev,
452 &dir->env_tail, 456 &dir->env_tail,
453 env); 457 env);
454 cur_buffers++; 458 cur_buffers++;
459 GNUNET_STATISTICS_set (stats,
460 "# buffer use",
461 cur_buffers,
462 GNUNET_NO);
455 /* Clean up 'rung' if now empty (and not head) */ 463 /* Clean up 'rung' if now empty (and not head) */
456 if ( (NULL == rung->rd_head) && 464 if ( (NULL == rung->rd_head) &&
457 (rung != rung_head) ) 465 (rung != rung_head) )
@@ -537,6 +545,10 @@ destroy_route (struct CadetRoute *route)
537 GNUNET_CONTAINER_multishortmap_remove (routes, 545 GNUNET_CONTAINER_multishortmap_remove (routes,
538 &route->cid.connection_of_tunnel, 546 &route->cid.connection_of_tunnel,
539 route)); 547 route));
548 GNUNET_STATISTICS_set (stats,
549 "# routes",
550 GNUNET_CONTAINER_multishortmap_size (routes),
551 GNUNET_NO);
540 destroy_direction (&route->prev); 552 destroy_direction (&route->prev);
541 destroy_direction (&route->next); 553 destroy_direction (&route->next);
542 GNUNET_free (route); 554 GNUNET_free (route);
@@ -657,6 +669,10 @@ dir_ready_cb (void *cls,
657 &dir->env_tail, 669 &dir->env_tail,
658 env); 670 env);
659 cur_buffers--; 671 cur_buffers--;
672 GNUNET_STATISTICS_set (stats,
673 "# buffer use",
674 cur_buffers,
675 GNUNET_NO);
660 lower_rung (dir); 676 lower_rung (dir);
661 dir->is_ready = GNUNET_NO; 677 dir->is_ready = GNUNET_NO;
662 GCP_send (dir->mqm, 678 GCP_send (dir->mqm,
@@ -875,6 +891,10 @@ handle_connection_create (void *cls,
875 &route->cid.connection_of_tunnel, 891 &route->cid.connection_of_tunnel,
876 route, 892 route,
877 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)); 893 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
894 GNUNET_STATISTICS_set (stats,
895 "# routes",
896 GNUNET_CONTAINER_multishortmap_size (routes),
897 GNUNET_NO);
878 route->hn = GNUNET_CONTAINER_heap_insert (route_heap, 898 route->hn = GNUNET_CONTAINER_heap_insert (route_heap,
879 route, 899 route,
880 route->last_use.abs_value_us); 900 route->last_use.abs_value_us);