diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-09-18 16:27:12 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-09-18 16:27:12 +0000 |
commit | 376027389d50418e7aae0d5046e851431e9b7bb2 (patch) | |
tree | 2de7ee34980ac4ee14145f0adaed250a8a6f3594 /src/testbed/profile-testbed.patch | |
parent | 40fbb91751a6d516c9cc113afaa1f49c8f2b071f (diff) | |
download | gnunet-376027389d50418e7aae0d5046e851431e9b7bb2.tar.gz gnunet-376027389d50418e7aae0d5046e851431e9b7bb2.zip |
- profiling looks for testbed service
Diffstat (limited to 'src/testbed/profile-testbed.patch')
-rw-r--r-- | src/testbed/profile-testbed.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/testbed/profile-testbed.patch b/src/testbed/profile-testbed.patch new file mode 100644 index 000000000..50a8d5fed --- /dev/null +++ b/src/testbed/profile-testbed.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | Index: Makefile.am | ||
2 | =================================================================== | ||
3 | --- Makefile.am (revision 29343) | ||
4 | +++ Makefile.am (working copy) | ||
5 | @@ -59,7 +59,7 @@ | ||
6 | $(top_builddir)/src/testing/libgnunettesting.la \ | ||
7 | $(top_builddir)/src/testbed/libgnunettestbed.la \ | ||
8 | $(top_builddir)/src/arm/libgnunetarm.la \ | ||
9 | - $(LTLIBINTL) $(Z_LIBS) | ||
10 | + $(LTLIBINTL) $(Z_LIBS) -lprofiler | ||
11 | gnunet_service_testbed_DEPENDENCIES = \ | ||
12 | libgnunettestbed.la | ||
13 | |||
14 | Index: gnunet-service-testbed.c | ||
15 | =================================================================== | ||
16 | --- gnunet-service-testbed.c (revision 29341) | ||
17 | +++ gnunet-service-testbed.c (working copy) | ||
18 | @@ -26,6 +26,7 @@ | ||
19 | |||
20 | #include "gnunet-service-testbed.h" | ||
21 | #include "gnunet-service-testbed_barriers.h" | ||
22 | +#include <gperftools/profiler.h> | ||
23 | |||
24 | /***********/ | ||
25 | /* Globals */ | ||
26 | @@ -956,9 +957,14 @@ | ||
27 | main (int argc, char *const *argv) | ||
28 | { | ||
29 | //sleep (15); /* Debugging */ | ||
30 | - return (GNUNET_OK == | ||
31 | - GNUNET_SERVICE_run (argc, argv, "testbed", GNUNET_SERVICE_OPTION_NONE, | ||
32 | - &testbed_run, NULL)) ? 0 : 1; | ||
33 | + int ret; | ||
34 | + | ||
35 | + ProfilerStart (NULL); | ||
36 | + ret = GNUNET_SERVICE_run (argc, argv, "testbed", GNUNET_SERVICE_OPTION_NONE, | ||
37 | + &testbed_run, NULL); | ||
38 | + ProfilerStop (); | ||
39 | + return (GNUNET_OK == ret) ? 0 : 1; | ||
40 | + | ||
41 | } | ||
42 | |||
43 | /* end of gnunet-service-testbed.c */ | ||