From 376027389d50418e7aae0d5046e851431e9b7bb2 Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Wed, 18 Sep 2013 16:27:12 +0000 Subject: [PATCH] - profiling looks for testbed service --- src/testbed/profile-testbed.patch | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/testbed/profile-testbed.patch 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 @@ +Index: Makefile.am +=================================================================== +--- Makefile.am (revision 29343) ++++ Makefile.am (working copy) +@@ -59,7 +59,7 @@ + $(top_builddir)/src/testing/libgnunettesting.la \ + $(top_builddir)/src/testbed/libgnunettestbed.la \ + $(top_builddir)/src/arm/libgnunetarm.la \ +- $(LTLIBINTL) $(Z_LIBS) ++ $(LTLIBINTL) $(Z_LIBS) -lprofiler + gnunet_service_testbed_DEPENDENCIES = \ + libgnunettestbed.la + +Index: gnunet-service-testbed.c +=================================================================== +--- gnunet-service-testbed.c (revision 29341) ++++ gnunet-service-testbed.c (working copy) +@@ -26,6 +26,7 @@ + + #include "gnunet-service-testbed.h" + #include "gnunet-service-testbed_barriers.h" ++#include + + /***********/ + /* Globals */ +@@ -956,9 +957,14 @@ + main (int argc, char *const *argv) + { + //sleep (15); /* Debugging */ +- return (GNUNET_OK == +- GNUNET_SERVICE_run (argc, argv, "testbed", GNUNET_SERVICE_OPTION_NONE, +- &testbed_run, NULL)) ? 0 : 1; ++ int ret; ++ ++ ProfilerStart (NULL); ++ ret = GNUNET_SERVICE_run (argc, argv, "testbed", GNUNET_SERVICE_OPTION_NONE, ++ &testbed_run, NULL); ++ ProfilerStop (); ++ return (GNUNET_OK == ret) ? 0 : 1; ++ + } + + /* end of gnunet-service-testbed.c */ -- 2.25.1