]> rtime.felk.cvut.cz Git - frescor/fna.git/commitdiff
frescan measurements
authorsangorrin <sangorrin@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Fri, 9 May 2008 08:37:19 +0000 (08:37 +0000)
committersangorrin <sangorrin@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Fri, 9 May 2008 08:37:19 +0000 (08:37 +0000)
git-svn-id: http://www.frescor.org/private/svn/frescor/fna/trunk@1162 35b4ef3e-fd22-0410-ab77-dab3279adceb

Changelog
src_frescan/frescan_debug.h
src_frescan/frescan_servers_replenishments.c
src_frescan/frescan_servers_replenishments.c_posix
tests/tests_frescan/test_frescan_servers_send_basic.c
tests/tests_frescan/test_frescan_servers_send_receive_measures.c

index cb39b428186a40eb6df605df2d64cbc548ced196..eaaa5af3cd62bb31c234ce29c1c4e2edfbbcb769 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,263 @@
 ------------------------------------------------------------------------
+r1148 | sangorrin | 2008-05-03 12:11:17 +0200 (Sat, 03 May 2008) | 2 lines
+
+added Changelog file
+
+------------------------------------------------------------------------
+r1147 | sangorrin | 2008-05-03 12:10:17 +0200 (Sat, 03 May 2008) | 1 line
+
+added the SRC param for the fragmentation layer and a INSTALL file
+------------------------------------------------------------------------
+r1138 | sangorrin | 2008-04-23 18:09:46 +0200 (Wed, 23 Apr 2008) | 1 line
+
+found the bug.. actually it was a very serious bug that affected fragmentation of messages.. i forgot to change in a function that frag_id==0 is not for fp messages anymore.. now frag_id==MX_IDS is for fp messages, so we can use the rest 0..MX_IDS-1 for the servers
+------------------------------------------------------------------------
+r1137 | sangorrin | 2008-04-23 11:23:29 +0200 (Wed, 23 Apr 2008) | 1 line
+
+added the functions to renegotiate and cancel a contract. TODO: there is a bug when cancelling contracts, reneg async, reserve-commit, spare capacity, measurements
+------------------------------------------------------------------------
+r1136 | sangorrin | 2008-04-22 13:10:30 +0200 (Tue, 22 Apr 2008) | 1 line
+
+make a simplified utilization analysis for the moment
+------------------------------------------------------------------------
+r1135 | sangorrin | 2008-04-22 11:27:04 +0200 (Tue, 22 Apr 2008) | 2 lines
+
+add the infraestructure for storing the negotiated contracts and performing the analysis through the analysis module. TODO: perform a test with those contracts to admit them. In the end the module implementation could be replaced by the cpu implementation.
+Spare capacity is not done yet. Now we have to implement negotiation and cancel of contracts.
+------------------------------------------------------------------------
+r1131 | sangorrin | 2008-04-21 19:35:20 +0200 (Mon, 21 Apr 2008) | 1 line
+
+michael found an error in the definition of the posix sporadic servers so i replaced them with new rules designed by michael... I still keep them because they are still analyzable (they dont behave like periodic tasks though) to compare them
+------------------------------------------------------------------------
+r1124 | sangorrin | 2008-04-18 12:50:20 +0200 (Fri, 18 Apr 2008) | 1 line
+
+corrected an error in the sporadic servers... the activation time is the timestamp when the packet is enqueued, not when the frame is sent!!!
+------------------------------------------------------------------------
+r1123 | sangorrin | 2008-04-18 10:50:18 +0200 (Fri, 18 Apr 2008) | 1 line
+
+tested negotiation in slave and in master.. it seems to work good with the new structures too. And its much simpler and clear! wohooo!! TODO: do the scheduling analysis with the API that is already done but for the moment use a utilization analysis, then allow renegotiations and cancelling of contracts... finally implement modifications to the posix sporadic server... do testing, measures and the deliverable... (the spare capacity will have to wait i guess..)
+------------------------------------------------------------------------
+r1122 | sangorrin | 2008-04-17 20:54:04 +0200 (Thu, 17 Apr 2008) | 1 line
+
+some reorganization... now the acceptor is simpler.. everything goes through requests and these are sent and received directly through the messages module... TODO: sched analysis, test negotiations, then add renegotiations and cancel..
+------------------------------------------------------------------------
+r1121 | sangorrin | 2008-04-17 17:52:19 +0200 (Thu, 17 Apr 2008) | 1 line
+
+rename the file
+------------------------------------------------------------------------
+r1120 | sangorrin | 2008-04-17 17:51:29 +0200 (Thu, 17 Apr 2008) | 1 line
+
+tests adapted to new names.. now the compile.. in makefile i add a target 'tests' to build them all in one shot
+------------------------------------------------------------------------
+r1119 | sangorrin | 2008-04-17 17:31:36 +0200 (Thu, 17 Apr 2008) | 1 line
+
+updated everything to the new structure... it compiles ok... next step, make sure that the tests compile, then check that the corresponding messages are sent and find possible bugs (very probable to have forgotten some info in the requests..) and then adapt it to do sched analysis
+------------------------------------------------------------------------
+r1118 | sangorrin | 2008-04-17 12:49:47 +0200 (Thu, 17 Apr 2008) | 1 line
+
+renamings... redo the request and messages part... also now there will be two threads in each node like in the dtm... still not compile.. i have to finish it in the afternoon
+------------------------------------------------------------------------
+r1117 | sangorrin | 2008-04-16 17:55:55 +0200 (Wed, 16 Apr 2008) | 2 lines
+
+renaming
+
+------------------------------------------------------------------------
+r1116 | sangorrin | 2008-04-16 17:27:03 +0200 (Wed, 16 Apr 2008) | 1 line
+
+i break the svn for one day to change the name of files, redo the negotiation messages system and implement renegotiations and canceling of contracts
+------------------------------------------------------------------------
+r1115 | sangorrin | 2008-04-15 13:47:40 +0200 (Tue, 15 Apr 2008) | 1 line
+
+update values
+------------------------------------------------------------------------
+r1114 | sangorrin | 2008-04-15 13:42:59 +0200 (Tue, 15 Apr 2008) | 1 line
+
+add a lock for the queue structures when dequeued, for th moment is hardwired to network 0
+------------------------------------------------------------------------
+r1113 | sangorrin | 2008-04-15 13:42:29 +0200 (Tue, 15 Apr 2008) | 1 line
+
+this lock was wrong.. it worked because of an error in marte os: if u block after enter in the critical section, the idle task enters unblocking the irqs again. An error should be returned i think
+------------------------------------------------------------------------
+r1112 | sangorrin | 2008-04-15 10:51:36 +0200 (Tue, 15 Apr 2008) | 1 line
+
+lock for the (future) negotiation
+------------------------------------------------------------------------
+r1111 | sangorrin | 2008-04-15 10:51:12 +0200 (Tue, 15 Apr 2008) | 1 line
+
+net
+------------------------------------------------------------------------
+r1110 | sangorrin | 2008-04-15 10:50:57 +0200 (Tue, 15 Apr 2008) | 1 line
+
+locks for server functions
+------------------------------------------------------------------------
+r1109 | sangorrin | 2008-04-15 10:20:17 +0200 (Tue, 15 Apr 2008) | 1 line
+
+add the modules for the frescan sched analysis with an initial API that we are discussing at the moment so it might change soon... it is not applied yet.. TODO: we will need new messages for the spare capacity distribution and structures to apply them at the right moment.. this is also ongoing work and research must be done on when is the right moment.
+------------------------------------------------------------------------
+r1108 | sangorrin | 2008-04-15 09:47:57 +0200 (Tue, 15 Apr 2008) | 2 lines
+
+update the names and add acceptor thread id to the general data
+
+------------------------------------------------------------------------
+r1107 | sangorrin | 2008-04-15 09:44:38 +0200 (Tue, 15 Apr 2008) | 2 lines
+
+renaming to neg threads
+
+------------------------------------------------------------------------
+r1106 | sangorrin | 2008-04-15 09:43:54 +0200 (Tue, 15 Apr 2008) | 2 lines
+
+joining threads module
+
+------------------------------------------------------------------------
+r1105 | sangorrin | 2008-04-14 18:58:45 +0200 (Mon, 14 Apr 2008) | 1 line
+
+abort when higher prio frame
+------------------------------------------------------------------------
+r1104 | sangorrin | 2008-04-09 13:19:45 +0200 (Wed, 09 Apr 2008) | 1 line
+
+add a test to obtain measures of a round trip
+------------------------------------------------------------------------
+r1103 | sangorrin | 2008-04-09 13:19:14 +0200 (Wed, 09 Apr 2008) | 1 line
+
+apps need to link to libfosa too
+------------------------------------------------------------------------
+r1098 | sangorrin | 2008-04-08 17:37:53 +0200 (Tue, 08 Apr 2008) | 1 line
+
+network enabling is now in fna_configuration.h
+------------------------------------------------------------------------
+r1097 | sangorrin | 2008-04-08 17:37:00 +0200 (Tue, 08 Apr 2008) | 1 line
+
+initialize pointer to null to avoid warning.. this is because the compiler does not know that im checking that a list is not empty before using it etc..
+------------------------------------------------------------------------
+r1096 | sangorrin | 2008-04-08 17:36:52 +0200 (Tue, 08 Apr 2008) | 1 line
+
+initialize pointer to null to avoid warning.. this is because the compiler does not know that im checking that a list is not empty before using it etc..
+------------------------------------------------------------------------
+r1095 | sangorrin | 2008-04-08 17:36:42 +0200 (Tue, 08 Apr 2008) | 1 line
+
+initialize pointer to null to avoid warning.. this is because the compiler does not know that im checking that a list is not empty before using it etc..
+------------------------------------------------------------------------
+r1094 | sangorrin | 2008-04-08 17:35:56 +0200 (Tue, 08 Apr 2008) | 1 line
+
+create a server in the negotiator thread... this thread should be renamed to MASTER local negotiator thread or sth like that cause the rest of negotiations are performed by the acceptor thread.. which also should be renamed to SLAVE negotiations or sth like that
+------------------------------------------------------------------------
+r1093 | sangorrin | 2008-04-08 17:34:51 +0200 (Tue, 08 Apr 2008) | 1 line
+
+implement send and receive in fna and bytes<->budget conversion functions... the test is in frsh/tests_distributed/test send receive basic
+------------------------------------------------------------------------
+r1092 | sangorrin | 2008-04-08 17:33:46 +0200 (Tue, 08 Apr 2008) | 1 line
+
+put neg channel to 0 by default so i dont forget it
+------------------------------------------------------------------------
+r1091 | sangorrin | 2008-04-08 17:32:45 +0200 (Tue, 08 Apr 2008) | 1 line
+
+tab
+------------------------------------------------------------------------
+r1090 | sangorrin | 2008-04-08 17:32:33 +0200 (Tue, 08 Apr 2008) | 1 line
+
+networks are enabled in fna_configuration.h now, not in CFLAGS... i keep the enables in config.mk for the moment but just rules.mk to know which directories should be compiled... with the future omk system i guess this is easier
+------------------------------------------------------------------------
+r1089 | sangorrin | 2008-04-08 10:45:59 +0200 (Tue, 08 Apr 2008) | 1 line
+
+now libfrescan.o instead of .a
+------------------------------------------------------------------------
+r1088 | sangorrin | 2008-04-08 10:45:24 +0200 (Tue, 08 Apr 2008) | 1 line
+
+now libfrescan is a relocatable object file instead of a library .a
+------------------------------------------------------------------------
+r1087 | sangorrin | 2008-04-08 10:44:54 +0200 (Tue, 08 Apr 2008) | 1 line
+
+added fna files, starting its implementation, the rest return an error and write not implemented so far
+------------------------------------------------------------------------
+r1086 | sangorrin | 2008-04-08 10:44:23 +0200 (Tue, 08 Apr 2008) | 1 line
+
+add flag for debugging frescan fna layer
+------------------------------------------------------------------------
+r1085 | sangorrin | 2008-04-08 10:44:01 +0200 (Tue, 08 Apr 2008) | 1 line
+
+add frescan operations
+------------------------------------------------------------------------
+r1084 | sangorrin | 2008-04-08 10:43:25 +0200 (Tue, 08 Apr 2008) | 1 line
+
+add prototypes for frescan
+------------------------------------------------------------------------
+r1083 | sangorrin | 2008-04-08 10:43:07 +0200 (Tue, 08 Apr 2008) | 1 line
+
+now im working on frescan.. ill update rtep if i broke the compilation later
+------------------------------------------------------------------------
+r1082 | sangorrin | 2008-04-08 10:42:38 +0200 (Tue, 08 Apr 2008) | 1 line
+
+now all will be included in libfna.a, the rest will be relocatable linked objects
+------------------------------------------------------------------------
+r1076 | sangorrin | 2008-04-07 17:58:28 +0200 (Mon, 07 Apr 2008) | 2 lines
+
+use frsh.h only, headers mess otherwise
+
+------------------------------------------------------------------------
+r1075 | sangorrin | 2008-04-07 17:49:13 +0200 (Mon, 07 Apr 2008) | 1 line
+
+include frsh.h to include everything because there were headers problems and miguel has thought it to include only this file
+------------------------------------------------------------------------
+r1074 | sangorrin | 2008-04-07 17:48:20 +0200 (Mon, 07 Apr 2008) | 1 line
+
+frsh_freelist is now part of utils as fadt_freelist
+------------------------------------------------------------------------
+r1073 | sangorrin | 2008-04-07 17:47:48 +0200 (Mon, 07 Apr 2008) | 1 line
+
+utils
+------------------------------------------------------------------------
+r1068 | sangorrin | 2008-04-07 10:22:18 +0200 (Mon, 07 Apr 2008) | 1 line
+
+neg in slave, receive results
+------------------------------------------------------------------------
+r1067 | sangorrin | 2008-04-07 10:21:55 +0200 (Mon, 07 Apr 2008) | 1 line
+
+negotiation reply (TODO: integrate the scheduling test component)
+------------------------------------------------------------------------
+r1065 | sangorrin | 2008-04-03 18:04:25 +0200 (Thu, 03 Apr 2008) | 1 line
+
+negotiation messages, so far a slave call negotiate which sends a negotiate msg which arrives to the master and sends a reply
+------------------------------------------------------------------------
+r1061 | sangorrin | 2008-04-01 18:09:39 +0200 (Tue, 01 Apr 2008) | 1 line
+
+tests for bwres basic
+------------------------------------------------------------------------
+r1060 | sangorrin | 2008-04-01 18:09:15 +0200 (Tue, 01 Apr 2008) | 1 line
+
+negotiator thread and bwres layer
+------------------------------------------------------------------------
+r1056 | sangorrin | 2008-04-01 11:55:31 +0200 (Tue, 01 Apr 2008) | 1 line
+
+makefile for the tests
+------------------------------------------------------------------------
+r1055 | sangorrin | 2008-04-01 11:55:23 +0200 (Tue, 01 Apr 2008) | 1 line
+
+some tests
+------------------------------------------------------------------------
+r1054 | sangorrin | 2008-04-01 11:55:07 +0200 (Tue, 01 Apr 2008) | 1 line
+
+starting to build the negotiations infrastructure
+------------------------------------------------------------------------
+r1053 | sangorrin | 2008-03-31 13:21:54 +0200 (Mon, 31 Mar 2008) | 1 line
+
+frescan compiles
+------------------------------------------------------------------------
+r1052 | sangorrin | 2008-03-31 13:16:37 +0200 (Mon, 31 Mar 2008) | 1 line
+
+starting adaptation to fosa of frescan.. some reordering..
+------------------------------------------------------------------------
+r1051 | sangorrin | 2008-03-31 12:24:03 +0200 (Mon, 31 Mar 2008) | 1 line
+
+added frescan sources
+------------------------------------------------------------------------
+r985 | sangorrin | 2008-01-03 12:00:01 +0100 (Thu, 03 Jan 2008) | 1 line
+
+changed to N measures
+------------------------------------------------------------------------
+r984 | sangorrin | 2008-01-03 11:59:36 +0100 (Thu, 03 Jan 2008) | 1 line
+
+added send sync operation
+------------------------------------------------------------------------
 r954 | sangorrin | 2007-12-13 12:58:22 +0100 (Thu, 13 Dec 2007) | 1 line
 
 some debugging flags and the target of the makefile
index 2cdaaa6c5b770ddd2dc727f9852d5913061d09c9..53e27b86ec6c99519f4a33b3e906034c5bab0a7c 100644 (file)
 #define FRESCAN_MESSAGES_ENABLE_DEBUG   false
 #define FRESCAN_SA_ENABLE_DEBUG         false
 
+/**
+ * MEASUREMENT FLAGS
+ */
+#define FRESCAN_MEASURE_REPL_TH         true
+#define FRESCAN_MEASURE_REPL_PROGRAM    false
+
 #endif // _MARTE_FRESCAN_DEBUG_H_
index 157c36399636ea46b1354df288d5b18646c07c66..9c8406e4b153d0ac0b377c8f9cda6b39e4df7791 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include <time.h>            // clock_gettime
+#include <assert.h>          // assert
 
 #include <misc/freelist.h>   // freelist_t
 #include <misc/linux_list.h> // list_add_tail
 #include "frescan_data.h"    // frescan_repl_op_t
 #include "fosa_threads_and_signals.h" // fosa_thread_attr_init...
 
+#if (FRESCAN_MEASURE_REPL_TH || FRESCAN_MEASURE_REPL_PROGRAM)
+#include <misc/time_measurement_posix.h>
+#include <misc/logger.h>
+static time_measure_id_t measure_id;
+#endif
+
 /**
  * the_repl_op_pool - pool of replenishment operations
  *
@@ -95,11 +102,12 @@ static void *frescan_repl_thread(void *arg)
         sigaddset(&set, FRESCAN_REPL_SIGNAL_NUM);
 
         while (1) {
+#if FRESCAN_MEASURE_REPL_TH
+                ret = time_measure_posix_begin(measure_id);
+                assert(ret == 0);
+#endif
                 ret = sigwaitinfo(&set, &siginfo);
-                if (ret == -1) {
-                        ERROR("sigwaitinfo failed\n");
-                        return NULL;
-                }
+                assert(ret != -1);
 
                 if (siginfo.si_signo != FRESCAN_REPL_SIGNAL_NUM) continue;
 
@@ -121,6 +129,12 @@ static void *frescan_repl_thread(void *arg)
                 if (!list_empty(&server->packet_list.fifo_list)) {
                         clock_gettime (CLOCK_MONOTONIC, &server->act_time);
                 }
+#if FRESCAN_MEASURE_REPL_TH
+                ret = time_measure_posix_end(measure_id, "thread");
+                assert(ret == 0);
+
+                while (logger_manual_call() > 0);
+#endif
         }
 
         return NULL;
@@ -157,6 +171,15 @@ int frescan_replenishments_init(frescan_network_t net)
         }
 
         // create the replenishment thread
+#if (FRESCAN_MEASURE_REPL_TH || FRESCAN_MEASURE_REPL_PROGRAM)
+        ret = logger_init(LOG_ETHERNET);
+        assert(ret == 0);
+
+        ret = time_measure_posix_create("repl",
+                                        CLOCK_THREAD_CPUTIME_ID,
+                                        &measure_id);
+        assert(ret == 0);
+#endif
 
         ret = fosa_thread_attr_init(&attr);
         if (ret != 0) {
@@ -207,6 +230,11 @@ int frescan_replenishment_program(frescan_network_t net,
         struct list_head *pos;
         struct timespec now;
 
+#if FRESCAN_MEASURE_REPL_PROGRAM
+        ret = time_measure_posix_begin(measure_id);
+        assert(ret == 0);
+#endif
+
         server = &the_servers_pool[net][ss];
 
         // extract the head
@@ -251,5 +279,12 @@ int frescan_replenishment_program(frescan_network_t net,
                 }
         }
 
+#if FRESCAN_MEASURE_REPL_PROGRAM
+                ret = time_measure_posix_end(measure_id, "program");
+                assert(ret == 0);
+
+                while (logger_manual_call() > 0);
+#endif
+
         return 0;
 }
index 32d54a59c9a9a5370d2a74f57db46d2c8f005fc5..e9b0864d6a9f91a23ab68ec7f2f6f5bf69b9f1eb 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include <time.h>            // clock_gettime
+#include <assert.h>          // assert
 
 #include <misc/freelist.h>   // freelist_t
 #include <misc/linux_list.h> // list_add_tail
 #include "frescan_data.h"    // frescan_repl_op_t
 #include "fosa_threads_and_signals.h" // fosa_thread_attr_init...
 
+#if (FRESCAN_MEASURE_REPL_TH || FRESCAN_MEASURE_REPL_PROGRAM)
+#include <misc/time_measurement_posix.h>
+#include <misc/logger.h>
+static time_measure_id_t measure_id;
+#endif
+
 /**
  * the_repl_op_pool - pool of replenishment operations
  *
@@ -97,6 +104,10 @@ static void *frescan_repl_thread(void *arg)
         sigaddset(&set, FRESCAN_REPL_SIGNAL_NUM);
 
         while (1) {
+#if FRESCAN_MEASURE_REPL_TH
+                ret = time_measure_posix_begin(measure_id);
+                assert(ret == 0);
+#endif
                 ret = sigwaitinfo(&set, &siginfo);
                 if (ret == -1) {
                         ERROR("sigwaitinfo failed\n");
@@ -171,6 +182,12 @@ static void *frescan_repl_thread(void *arg)
                         ERROR("could not set replenishment timer\n");
                         return NULL;
                 }
+#if FRESCAN_MEASURE_REPL_TH
+                ret = time_measure_posix_end(measure_id, "thread");
+                assert(ret == 0);
+
+                while (logger_manual_call() > 0);
+#endif
         }
 
         return NULL;
@@ -207,6 +224,15 @@ int frescan_replenishments_init(frescan_network_t net)
         }
 
         // create the replenishment thread
+#if (FRESCAN_MEASURE_REPL_TH || FRESCAN_MEASURE_REPL_PROGRAM)
+        ret = logger_init(LOG_ETHERNET);
+        assert(ret == 0);
+
+        ret = time_measure_posix_create("repl",
+                                        CLOCK_THREAD_CPUTIME_ID,
+                                        &measure_id);
+        assert(ret == 0);
+#endif
 
         ret = fosa_thread_attr_init(&attr);
         if (ret != 0) {
@@ -256,6 +282,11 @@ int frescan_replenishment_program(frescan_network_t net,
         struct itimerspec timerdata;
         frescan_server_data_t *server;
 
+#if FRESCAN_MEASURE_REPL_PROGRAM
+        ret = time_measure_posix_begin(measure_id);
+        assert(ret == 0);
+#endif
+
         server = &the_servers_pool[net][ss];
 
         repl = frescan_repl_op_alloc();
@@ -291,5 +322,12 @@ int frescan_replenishment_program(frescan_network_t net,
                 }
         }
 
+#if FRESCAN_MEASURE_REPL_PROGRAM
+                ret = time_measure_posix_end(measure_id, "program");
+                assert(ret == 0);
+
+                while (logger_manual_call() > 0);
+#endif
+
         return 0;
 }
index 74dcc4e6ade53c79bec2bdea3c8658ae7e421908..900f799f48f87aa0467f7c56f43e56a304d17730 100644 (file)
@@ -43,16 +43,11 @@ int main ()
         frescan_init_params_t init_params;
         frescan_server_params_t server_params;
 
-
-
 #ifdef ENABLE_LOGGING
-
         ret = logger_init(LOG_DEVICE);
         assert(ret == 0);
-
         printf("Changing to membuffer console\n");
         MEMBUFFER_CONSOLE_INIT();
-
 #endif
 
         printf(">> Initializing FRESCAN\n");
index b15f9ff9a0f6593bf34c6f7232cdeee86f629bff..0c6f55bbf05eb0e0d66ae4266b3235ae9a8644e7 100644 (file)
@@ -10,7 +10,7 @@
 #define NETWORK 0
 #define LOG_DEVICE LOG_ETHERNET
 
-#define NUM_MSG_BYTES  1488  // 8 32 64 512 1488
+#define NUM_MSG_BYTES  512  // 8 32 64 512 1488
 #define ENABLE_DEBUG   false
 #define NUM_MEASURES   100
 
@@ -22,6 +22,8 @@
 static const trace_point_id_t BEGIN = 0;
 static const trace_point_id_t END = 1;
 
+#define DISABLE_MEASURES
+
 int main ()
 {
         int i, ret;
@@ -51,8 +53,8 @@ int main ()
         DEBUG(ENABLE_DEBUG, ">> Creating a Server\n");
 
         server_params.values.budget = NUM_MSG_BYTES / 8;
-        server_params.values.period.tv_sec  = 1;
-        server_params.values.period.tv_nsec = 0;
+        server_params.values.period.tv_sec  = 0;
+        server_params.values.period.tv_nsec = 500000000;
         server_params.prio = 4;
 
         ret = frescan_servers_create(NETWORK,
@@ -74,6 +76,7 @@ int main ()
         if (me == 0) {
                 DEBUG(ENABLE_DEBUG, ">> Init logger and timer measurements\n");
 
+#ifndef DISABLE_MEASURES
                 ret = logger_init(LOG_DEVICE);
                 assert(ret == 0);
 
@@ -82,12 +85,13 @@ int main ()
 
                 ret = time_measure_hwtime_init(END, "frescan_end");
                 assert(ret == 0);
-
+#endif
                 DEBUG(ENABLE_DEBUG, ">> Enter in loop for send-recv packets\n");
 
                 for (i=0; i<NUM_MEASURES; i++) {
+#ifndef DISABLE_MEASURES
                         time_measure_hwtime_set_timestamp(BEGIN);
-
+#endif
                         ret = frescan_send(&send_params,
                                            (uint8_t *)msg,
                                            NUM_MSG_BYTES);
@@ -100,12 +104,13 @@ int main ()
                                            &from,
                                            &prio);
                         if (ret != 0) ERROR ("could not receive message");
-
+#ifndef DISABLE_MEASURES
                         time_measure_hwtime_set_timestamp(END);
-
+#endif
                         DEBUG(ENABLE_DEBUG, ">> received %d bytes\n", recv_bytes);
+                        sleep(1);
                 }
-
+#ifndef DISABLE_MEASURES
                 ret = time_measure_hwtime_write_membuffer(BEGIN);
                 assert(ret == 0);
 
@@ -113,7 +118,7 @@ int main ()
                 assert(ret == 0);
 
                 while (logger_manual_call() > 0);
-
+#endif
         } else {
                 DEBUG(ENABLE_DEBUG, ">> Enter in loop for recv-send packets\n");
 
@@ -133,5 +138,7 @@ int main ()
                 }
         }
 
+        sleep(100);
+
         return 0;
 }