diff options
author | Elias Summermatter <elias.summermatter@seccom.ch> | 2021-04-03 22:13:26 +0200 |
---|---|---|
committer | Elias Summermatter <elias.summermatter@seccom.ch> | 2021-04-03 22:13:26 +0200 |
commit | 57075154d229453f6cfa267466d7f46404d817c8 (patch) | |
tree | 7fdb0b2547fb164f08641a5d6faef73b75ad4316 /src/setu/perf_setu_api.c | |
parent | 7af07d8f4eda46d4104b913450500ebc58333bc0 (diff) | |
download | gnunet-57075154d229453f6cfa267466d7f46404d817c8.tar.gz gnunet-57075154d229453f6cfa267466d7f46404d817c8.zip |
Fixed bug in perfomance forking
Diffstat (limited to 'src/setu/perf_setu_api.c')
-rw-r--r-- | src/setu/perf_setu_api.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/setu/perf_setu_api.c b/src/setu/perf_setu_api.c index 2554bad80..f2b179817 100644 --- a/src/setu/perf_setu_api.c +++ b/src/setu/perf_setu_api.c | |||
@@ -425,14 +425,13 @@ static void run_petf_thread(int total_runs) { | |||
425 | //Father code (before child processes start) | 425 | //Father code (before child processes start) |
426 | for (int processed = 0; processed < total_runs;) { | 426 | for (int processed = 0; processed < total_runs;) { |
427 | for (int id = 0; id < core_count; id++) { | 427 | for (int id = 0; id < core_count; id++) { |
428 | |||
429 | if(processed >= total_runs) break; | 428 | if(processed >= total_runs) break; |
430 | 429 | ||
431 | if ((child_pid = fork()) == 0) { | 430 | if ((child_pid = fork()) == 0) { |
432 | perf_thread(); | 431 | //perf_thread(); |
433 | exit(0); | 432 | exit(0); |
434 | } | 433 | } |
435 | processed=+1; | 434 | processed += 1; |
436 | } | 435 | } |
437 | while ((wpid = wait(&status)) > 0); | 436 | while ((wpid = wait(&status)) > 0); |
438 | } | 437 | } |
@@ -470,7 +469,7 @@ static void execute_perf() { | |||
470 | GNUNET_ERROR_TYPE_ERROR, | 469 | GNUNET_ERROR_TYPE_ERROR, |
471 | _("Failed to write subsystem default identifier map to `%s'.\n"), | 470 | _("Failed to write subsystem default identifier map to `%s'.\n"), |
472 | setu_cfg); | 471 | setu_cfg); |
473 | run_petf_thread(100); | 472 | run_petf_thread(1000); |
474 | } | 473 | } |
475 | } | 474 | } |
476 | return 0; | 475 | return 0; |