]> rtime.felk.cvut.cz Git - frescor/fna.git/commitdiff
changed to N measures
authorsangorrin <sangorrin@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Thu, 3 Jan 2008 11:00:01 +0000 (11:00 +0000)
committersangorrin <sangorrin@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Thu, 3 Jan 2008 11:00:01 +0000 (11:00 +0000)
git-svn-id: http://www.frescor.org/private/svn/frescor/fna/trunk@985 35b4ef3e-fd22-0410-ab77-dab3279adceb

tests/tests_rtep_fna/test_c_rtep_fna_measurement.c

index 86c9498ce2c3cca6014907352e61ed136b5a32fc..2581bd114da281b10816ca98b17dcdbe35da9404 100644 (file)
@@ -91,9 +91,11 @@ static const trace_point_id_t END_CONTRACT_NEG = 1;
 #define DEBUG(x,args...)
 #endif
 
+#define MX_MEASURES 40
+
 int main ()
 {
-    int err;
+    int err, i;
     rtep_station_id_t me, normal_station, multicast_station;
     frsh_network_address_t frsh_address;
     char multicast_name[] = "broadcast";
@@ -204,13 +206,15 @@ int main ()
         frsh_contract.preemption_level = 4;
 
         // Negotiate the contract
-        time_measure_hwtime_set_timestamp(BEGIN_CONTRACT_NEG);
+        for (i=0; i<MX_MEASURES; i++) {
+                time_measure_hwtime_set_timestamp(BEGIN_CONTRACT_NEG);
 
-        err = rtep_fna_operations.fna_contract_negotiate
-                (FRSH_RESOURCE_ID_DEFAULT, &frsh_contract, &vres);
-        assert (err == 0);
+                err = rtep_fna_operations.fna_contract_negotiate
+                        (FRSH_RESOURCE_ID_DEFAULT, &frsh_contract, &vres);
+                assert (err == 0);
 
-        time_measure_hwtime_set_timestamp(END_CONTRACT_NEG);
+                time_measure_hwtime_set_timestamp(END_CONTRACT_NEG);
+        }
 
         printf("Contract accepted\n");