REST/NAMESTORE: rework API
[oweals/gnunet.git] / src / ats-tests / perf_ats.h
index 15ff5d62a07322898ea6f03124919bcab7bdbf86..4b52d4482bb91e2e3442012aa6e418576cda0a55 100644 (file)
@@ -1,21 +1,21 @@
 /*
  This file is part of GNUnet.
- (C) 2010-2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2010-2013 GNUnet e.V.
 
- GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 3, or (at your
- option) any later version.
+ GNUnet is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ or (at your option) any later version.
 
  GNUnet is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- General Public License for more details.
Affero General Public License for more details.
 
- You should have received a copy of the GNU General Public License
- along with GNUnet; see the file COPYING.  If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ You should have received a copy of the GNU Affero General Public License
+ along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+     SPDX-License-Identifier: AGPL3.0-or-later
  */
 /**
  * @file ats/perf_ats.c
 #include "gnunet_testbed_service.h"
 #include "gnunet_ats_service.h"
 #include "gnunet_core_service.h"
+#include "ats-testing.h"
 
-#define TEST_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 30)
+#define TEST_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 120)
 #define BENCHMARK_DURATION GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 10)
 #define LOGGING_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 500)
 #define TESTNAME_PREFIX "perf_ats_"
-#define DEFAULT_SLAVES_NUM 3
+#define DEFAULT_SLAVES_NUM 2
 #define DEFAULT_MASTERS_NUM 1
 
 #define TEST_ATS_PREFRENCE_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1)
@@ -76,9 +77,9 @@ struct BenchmarkPartner
   struct GNUNET_TIME_Absolute last_message_sent;
 
   /**
-   * Accumulated delay for all messages
+   * Accumulated RTT for all messages
    */
-  unsigned int total_app_delay;
+  unsigned int total_app_rtt;
 
   /**
    * Number of messages sent to this partner
@@ -109,6 +110,18 @@ struct BenchmarkPartner
   uint32_t bandwidth_in;
 
   uint32_t bandwidth_out;
+
+  uint32_t ats_utilization_up;
+
+  uint32_t ats_utilization_down;
+
+  uint32_t ats_network_type;
+
+  uint32_t ats_cost_wan;
+
+  uint32_t ats_cost_lan;
+
+  uint32_t ats_cost_wlan;
 };
 
 
@@ -183,7 +196,7 @@ struct BenchmarkPeer
    * Masters only
    * Progress task
    */
-  GNUNET_SCHEDULER_TaskIdentifier ats_task;
+  struct GNUNET_SCHEDULER_Task * ats_task;
 
   /**
    * Masters only
@@ -235,12 +248,4 @@ struct BenchmarkPeer
 };
 
 
-void
-perf_logging_stop ();
-
-void
-perf_logging_start (struct GNUNET_TIME_Relative log_frequency,
-    char * testname, struct BenchmarkPeer *masters, int num_masters);
-
-
 /* end of file perf_ats.h */