diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-06 20:55:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-06 20:55:28 +0000 |
commit | 61c39c60565b386e0e12ea669556b030e8cd7180 (patch) | |
tree | 59109aeab8297bdc996faca8c4e38ec7426c36cf /src/nse/gnunet-nse-profiler.c | |
parent | 780eb09dd8040ecf8649d40ddf8314464e0fc48e (diff) | |
download | gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.tar.gz gnunet-61c39c60565b386e0e12ea669556b030e8cd7180.zip |
-remove trailing whitespace
Diffstat (limited to 'src/nse/gnunet-nse-profiler.c')
-rw-r--r-- | src/nse/gnunet-nse-profiler.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/nse/gnunet-nse-profiler.c b/src/nse/gnunet-nse-profiler.c index fa0b97440..2dbca7541 100644 --- a/src/nse/gnunet-nse-profiler.c +++ b/src/nse/gnunet-nse-profiler.c | |||
@@ -133,7 +133,7 @@ static int verbose; | |||
133 | 133 | ||
134 | /** | 134 | /** |
135 | * Name of the file with the hosts to run the test over (configuration option) | 135 | * Name of the file with the hosts to run the test over (configuration option) |
136 | */ | 136 | */ |
137 | static char *hosts_file; | 137 | static char *hosts_file; |
138 | 138 | ||
139 | /** | 139 | /** |
@@ -274,7 +274,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
274 | if (GNUNET_YES == shutting_down) | 274 | if (GNUNET_YES == shutting_down) |
275 | return; | 275 | return; |
276 | shutting_down = GNUNET_YES; | 276 | shutting_down = GNUNET_YES; |
277 | LOG_DEBUG ("Ending test.\n"); | 277 | LOG_DEBUG ("Ending test.\n"); |
278 | close_monitor_connections (); | 278 | close_monitor_connections (); |
279 | if (NULL != data_file) | 279 | if (NULL != data_file) |
280 | { | 280 | { |
@@ -314,7 +314,7 @@ shutdown_now () | |||
314 | * of the size estimation values seen | 314 | * of the size estimation values seen |
315 | */ | 315 | */ |
316 | static void | 316 | static void |
317 | handle_estimate (void *cls, | 317 | handle_estimate (void *cls, |
318 | struct GNUNET_TIME_Absolute timestamp, | 318 | struct GNUNET_TIME_Absolute timestamp, |
319 | double estimate, double std_dev) | 319 | double estimate, double std_dev) |
320 | { | 320 | { |
@@ -329,7 +329,7 @@ handle_estimate (void *cls, | |||
329 | peer, estimate, std_dev); | 329 | peer, estimate, std_dev); |
330 | return; | 330 | return; |
331 | } | 331 | } |
332 | size = GNUNET_snprintf (output_buffer, | 332 | size = GNUNET_snprintf (output_buffer, |
333 | sizeof (output_buffer), | 333 | sizeof (output_buffer), |
334 | "%p %llu %llu %f %f %f\n", | 334 | "%p %llu %llu %f %f %f\n", |
335 | peer, peers_running, | 335 | peer, peers_running, |
@@ -345,7 +345,7 @@ handle_estimate (void *cls, | |||
345 | /** | 345 | /** |
346 | * Adapter function called to establish a connection to | 346 | * Adapter function called to establish a connection to |
347 | * NSE service. | 347 | * NSE service. |
348 | * | 348 | * |
349 | * @param cls closure (the 'struct NSEPeer') | 349 | * @param cls closure (the 'struct NSEPeer') |
350 | * @param cfg configuration of the peer to connect to; will be available until | 350 | * @param cfg configuration of the peer to connect to; will be available until |
351 | * GNUNET_TESTBED_operation_done() is called on the operation returned | 351 | * GNUNET_TESTBED_operation_done() is called on the operation returned |
@@ -365,11 +365,11 @@ nse_connect_adapter (void *cls, | |||
365 | /** | 365 | /** |
366 | * Adapter function called to destroy a connection to | 366 | * Adapter function called to destroy a connection to |
367 | * NSE service. | 367 | * NSE service. |
368 | * | 368 | * |
369 | * @param cls closure | 369 | * @param cls closure |
370 | * @param op_result service handle returned from the connect adapter | 370 | * @param op_result service handle returned from the connect adapter |
371 | */ | 371 | */ |
372 | static void | 372 | static void |
373 | nse_disconnect_adapter (void *cls, | 373 | nse_disconnect_adapter (void *cls, |
374 | void *op_result) | 374 | void *op_result) |
375 | { | 375 | { |
@@ -389,7 +389,7 @@ nse_disconnect_adapter (void *cls, | |||
389 | */ | 389 | */ |
390 | static int | 390 | static int |
391 | stat_iterator (void *cls, | 391 | stat_iterator (void *cls, |
392 | const char *subsystem, | 392 | const char *subsystem, |
393 | const char *name, | 393 | const char *name, |
394 | uint64_t value, int is_persistent) | 394 | uint64_t value, int is_persistent) |
395 | { | 395 | { |
@@ -404,7 +404,7 @@ stat_iterator (void *cls, | |||
404 | if (0 != flag) | 404 | if (0 != flag) |
405 | flag = 1; | 405 | flag = 1; |
406 | size = GNUNET_asprintf (&output_buffer, "%llu %llu %u\n", | 406 | size = GNUNET_asprintf (&output_buffer, "%llu %llu %u\n", |
407 | now.abs_value_us / 1000LL / 1000LL, | 407 | now.abs_value_us / 1000LL / 1000LL, |
408 | value, flag); | 408 | value, flag); |
409 | if (size != GNUNET_DISK_file_write (data_file, output_buffer, size)) | 409 | if (size != GNUNET_DISK_file_write (data_file, output_buffer, size)) |
410 | { | 410 | { |
@@ -431,7 +431,7 @@ stat_connect_adapter (void *cls, | |||
431 | const struct GNUNET_CONFIGURATION_Handle *cfg) | 431 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
432 | { | 432 | { |
433 | struct NSEPeer *peer = cls; | 433 | struct NSEPeer *peer = cls; |
434 | 434 | ||
435 | peer->sh = GNUNET_STATISTICS_create ("nse-profiler", cfg); | 435 | peer->sh = GNUNET_STATISTICS_create ("nse-profiler", cfg); |
436 | return peer->sh; | 436 | return peer->sh; |
437 | } | 437 | } |
@@ -502,18 +502,18 @@ connect_nse_service () | |||
502 | unsigned int connections; | 502 | unsigned int connections; |
503 | 503 | ||
504 | if (0 == connection_limit) | 504 | if (0 == connection_limit) |
505 | return; | 505 | return; |
506 | LOG_DEBUG ("Connecting to nse service of peers\n"); | 506 | LOG_DEBUG ("Connecting to nse service of peers\n"); |
507 | connections = 0; | 507 | connections = 0; |
508 | for (i = 0; i < num_peers_in_round[current_round]; i++) | 508 | for (i = 0; i < num_peers_in_round[current_round]; i++) |
509 | { | 509 | { |
510 | if ((num_peers_in_round[current_round] > connection_limit) && | 510 | if ((num_peers_in_round[current_round] > connection_limit) && |
511 | (0 != (i % (num_peers_in_round[current_round] / connection_limit)))) | 511 | (0 != (i % (num_peers_in_round[current_round] / connection_limit)))) |
512 | continue; | 512 | continue; |
513 | LOG_DEBUG ("Connecting to nse service of peer %d\n", i); | 513 | LOG_DEBUG ("Connecting to nse service of peer %d\n", i); |
514 | current_peer = GNUNET_malloc (sizeof (struct NSEPeer)); | 514 | current_peer = GNUNET_malloc (sizeof (struct NSEPeer)); |
515 | current_peer->daemon = daemons[i]; | 515 | current_peer->daemon = daemons[i]; |
516 | current_peer->nse_op | 516 | current_peer->nse_op |
517 | = GNUNET_TESTBED_service_connect (NULL, | 517 | = GNUNET_TESTBED_service_connect (NULL, |
518 | current_peer->daemon, | 518 | current_peer->daemon, |
519 | "nse", | 519 | "nse", |
@@ -545,7 +545,7 @@ connect_nse_service () | |||
545 | * @param tc scheduler context (unused) | 545 | * @param tc scheduler context (unused) |
546 | */ | 546 | */ |
547 | static void | 547 | static void |
548 | next_round (void *cls, | 548 | next_round (void *cls, |
549 | const struct GNUNET_SCHEDULER_TaskContext *tc); | 549 | const struct GNUNET_SCHEDULER_TaskContext *tc); |
550 | 550 | ||
551 | 551 | ||
@@ -558,7 +558,7 @@ next_round (void *cls, | |||
558 | * @param tc unused | 558 | * @param tc unused |
559 | */ | 559 | */ |
560 | static void | 560 | static void |
561 | finish_round (void *cls, | 561 | finish_round (void *cls, |
562 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 562 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
563 | { | 563 | { |
564 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 564 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
@@ -606,12 +606,12 @@ make_oplist_entry () | |||
606 | * @param op the operation handle | 606 | * @param op the operation handle |
607 | * @param emsg NULL on success; otherwise an error description | 607 | * @param emsg NULL on success; otherwise an error description |
608 | */ | 608 | */ |
609 | static void | 609 | static void |
610 | manage_service_cb (void *cls, struct GNUNET_TESTBED_Operation *op, | 610 | manage_service_cb (void *cls, struct GNUNET_TESTBED_Operation *op, |
611 | const char *emsg) | 611 | const char *emsg) |
612 | { | 612 | { |
613 | struct OpListEntry *entry = cls; | 613 | struct OpListEntry *entry = cls; |
614 | 614 | ||
615 | GNUNET_TESTBED_operation_done (entry->op); | 615 | GNUNET_TESTBED_operation_done (entry->op); |
616 | if (NULL != emsg) | 616 | if (NULL != emsg) |
617 | { | 617 | { |
@@ -673,13 +673,13 @@ adjust_running_peers () | |||
673 | * @param tc unused | 673 | * @param tc unused |
674 | */ | 674 | */ |
675 | static void | 675 | static void |
676 | next_round (void *cls, | 676 | next_round (void *cls, |
677 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 677 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
678 | { | 678 | { |
679 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) | 679 | if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason)) |
680 | return; | 680 | return; |
681 | LOG_DEBUG ("Disconnecting nse service of peers\n"); | 681 | LOG_DEBUG ("Disconnecting nse service of peers\n"); |
682 | current_round++; | 682 | current_round++; |
683 | if (current_round == num_rounds) | 683 | if (current_round == num_rounds) |
684 | { | 684 | { |
685 | /* this was the last round, terminate */ | 685 | /* this was the last round, terminate */ |
@@ -705,7 +705,7 @@ next_round (void *cls, | |||
705 | * @param event information on what is happening | 705 | * @param event information on what is happening |
706 | */ | 706 | */ |
707 | static void | 707 | static void |
708 | master_controller_cb (void *cls, | 708 | master_controller_cb (void *cls, |
709 | const struct GNUNET_TESTBED_EventInformation *event) | 709 | const struct GNUNET_TESTBED_EventInformation *event) |
710 | { | 710 | { |
711 | switch (event->type) | 711 | switch (event->type) |
@@ -735,7 +735,7 @@ master_controller_cb (void *cls, | |||
735 | * @param links_failed the number of overlay link connection attempts that | 735 | * @param links_failed the number of overlay link connection attempts that |
736 | * failed | 736 | * failed |
737 | */ | 737 | */ |
738 | static void | 738 | static void |
739 | test_master (void *cls, | 739 | test_master (void *cls, |
740 | struct GNUNET_TESTBED_RunHandle *h, | 740 | struct GNUNET_TESTBED_RunHandle *h, |
741 | unsigned int num_peers_, | 741 | unsigned int num_peers_, |
@@ -775,7 +775,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
775 | { | 775 | { |
776 | char *tok; | 776 | char *tok; |
777 | uint64_t event_mask; | 777 | uint64_t event_mask; |
778 | unsigned int num; | 778 | unsigned int num; |
779 | 779 | ||
780 | ok = 1; | 780 | ok = 1; |
781 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); | 781 | testing_cfg = GNUNET_CONFIGURATION_dup (cfg); |
@@ -806,7 +806,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
806 | return; | 806 | return; |
807 | } | 807 | } |
808 | if ( (NULL != data_filename) && | 808 | if ( (NULL != data_filename) && |
809 | (NULL == (data_file = | 809 | (NULL == (data_file = |
810 | GNUNET_DISK_file_open (data_filename, | 810 | GNUNET_DISK_file_open (data_filename, |
811 | GNUNET_DISK_OPEN_READWRITE | | 811 | GNUNET_DISK_OPEN_READWRITE | |
812 | GNUNET_DISK_OPEN_TRUNCATE | | 812 | GNUNET_DISK_OPEN_TRUNCATE | |
@@ -839,7 +839,7 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
839 | NULL, /* master_controller_cb cls */ | 839 | NULL, /* master_controller_cb cls */ |
840 | &test_master, | 840 | &test_master, |
841 | NULL); /* test_master cls */ | 841 | NULL); /* test_master cls */ |
842 | shutdown_task_id = | 842 | shutdown_task_id = |
843 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, | 843 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, |
844 | &shutdown_task, NULL); | 844 | &shutdown_task, NULL); |
845 | } | 845 | } |