guix-env: some update.
[oweals/gnunet.git] / src / testbed / profile-testbed.patch
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 */