GNUnet  0.10.x
gnunet-ats-solver-eval.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2010-2013 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
26 #ifndef GNUNET_ATS_SOLVER_EVAL_H
27 #define GNUNET_ATS_SOLVER_EVAL_H
28 
29 #include "platform.h"
30 #include "gnunet_util_lib.h"
31 #include "gnunet_ats_plugin.h"
32 #include "gnunet_ats_service.h"
35 #include "test_ats_api_common.h"
36 
38 {
43 };
44 
45 
47 {
56 };
57 
59 {
63  char *plugin;
64 
69 
74 
79 };
80 
82 {
86 };
87 
89 {
90  /* DLL list for logging time steps */
93 
94  /* peer id */
95  long long unsigned int pid;
96 
97  /* address id */
98  long long unsigned int aid;
99 
101 
102 };
103 
105 {
108 
109  struct LoggingPeer *head;
110  struct LoggingPeer *tail;
111 
112  struct GNUNET_TIME_Absolute timestamp;
114 };
115 
117 {
118  struct LoggingPeer *prev;
119  struct LoggingPeer *next;
120 
121  long long unsigned int id;
123  double pref_abs[GNUNET_ATS_PREFERENCE_END];
124  double pref_norm[GNUNET_ATS_PREFERENCE_END];
126 
129 };
130 
132 {
135 
136  long long unsigned int aid;
137  int active;
138  uint32_t network;
139  uint32_t assigned_bw_in;
140  uint32_t assigned_bw_out;
141 
142  double prop_abs[GNUNET_ATS_PropertyCount];
143  double prop_norm[GNUNET_ATS_PropertyCount];
144 };
145 
146 
147 struct TestPeer
148 {
149  struct TestPeer *prev;
150  struct TestPeer *next;
151 
152 
153  long long unsigned int id;
156 
157  double pref_abs[GNUNET_ATS_PreferenceCount];
158  double pref_norm[GNUNET_ATS_PreferenceCount];
159 
160  uint32_t assigned_bw_in;
161  uint32_t assigned_bw_out;
162 
165 };
166 
167 
169 {
170  struct TestAddress *next;
171  struct TestAddress *prev;
172 
173  long long unsigned int aid;
175  uint32_t network;
176 
177  double prop_abs[GNUNET_ATS_PropertyCount];
178  double prop_norm[GNUNET_ATS_PropertyCount];
179 };
180 
181 struct Episode;
182 
183 struct Experiment;
184 
186  struct Episode *e);
187 
189  struct GNUNET_TIME_Relative duration,int success);
190 
195 {
198 
199  long long unsigned int address_id;
200  long long unsigned int peer_id;
201  long long unsigned int client_id;
202 
203  long long unsigned int address_session;
204  unsigned int address_network;
205  char*address;
206  char*plugin;
207 
208 
209  long long unsigned int base_rate;
210  long long unsigned int max_rate;
211  struct GNUNET_TIME_Relative period;
212  struct GNUNET_TIME_Relative frequency;
213  struct GNUNET_TIME_Relative feedback_delay;
214 
216  enum GeneratorType gen_type;
218  // enum GNUNET_ATS_Property prop_type;
219 };
220 
221 struct Episode
222 {
223  int id;
224  struct Episode *next;
226 
229 };
230 
232 {
234  struct GNUNET_TIME_Relative log_freq;
235 
236  /* DLL list for logging time steps */
239 };
240 
242 {
243  char *name;
244  char *log_prefix;
245  char *cfg_file;
248 
249  struct GNUNET_TIME_Relative log_freq;
250  struct GNUNET_TIME_Relative max_duration;
251  struct GNUNET_TIME_Relative total_duration;
253  unsigned int num_episodes;
254  struct Episode *start;
255 
257 
260  struct Episode *cur;
261 
264 };
265 
267 {
270 
272 
273  long long unsigned int peer;
274  unsigned int client_id;
275 
277 
278  long int base_value;
279  long int max_value;
280  struct GNUNET_TIME_Relative duration_period;
281  struct GNUNET_TIME_Relative frequency;
282  struct GNUNET_TIME_Relative feedback_frequency;
283 
286  struct GNUNET_TIME_Absolute next_ping_transmission;
287  struct GNUNET_TIME_Absolute time_start;
288 
289 
290  /* Feedback */
294 
295  double pref_bw_old;
297 
298  struct GNUNET_TIME_Absolute feedback_last;
299 
300  struct GNUNET_TIME_Absolute feedback_last_bw_update;
301  struct GNUNET_TIME_Absolute feedback_last_delay_update;
305 
306 };
307 
308 
310 {
313 
315 
316  long long unsigned int peer;
317  long long unsigned int address_id;
318 
321  uint32_t ats_property;
322 
323  long int base_value;
324  long int max_value;
325  struct GNUNET_TIME_Relative duration_period;
326  struct GNUNET_TIME_Relative frequency;
327 
329  struct GNUNET_TIME_Absolute next_ping_transmission;
330  struct GNUNET_TIME_Absolute time_start;
331 };
332 
333 #endif /* #ifndef GNUNET_ATS_SOLVER_EVAL_H */
334 /* end of file ats-testing.h */
struct LoggingPeer * head
struct GNUNET_ATS_TEST_Operation * next
struct Episode * start
struct PreferenceGenerator * next
struct LoggingTimeStep * tail
GNUNET_ATS_TESTING_EpisodeDoneCallback ep_done_cb
long long unsigned int peer_id
GNUNET_ATS_TESTING_ExperimentDoneCallback e_done_cb
static struct GNUNET_TIME_Relative delta
Definition: speedup.c:35
struct Episode * next
struct LoggingTimeStep * prev
struct TestPeer * prev
struct LoggingAddress * addr_tail
long long unsigned int peer
long long unsigned int aid
struct LoggingTimeStep * next
long long unsigned int address_id
long long unsigned int id
struct LoggingTimeStep * head
static struct Experiment * e
ats service address: management of ATS properties and preferences normalization
static char * peer_id
Option –peer.
Definition: gnunet-cadet.c:42
unsigned int num_episodes
long long unsigned int client_id
long long unsigned int pid
struct TestAddress * prev
struct LoggingAddress * next
GNUNET_ATS_Solvers
struct TestAddress * addr_tail
End of preference list.
struct ATS_Address * ats_addr
struct PropertyGenerator * next
enum GNUNET_ATS_PreferenceKind kind
struct LoggingPeer * tail
struct GNUNET_SCHEDULER_Task * experiment_timeout_task
struct LoggingPeer * next
struct LoggingAddress * addr_head
struct GNUNET_SCHEDULER_Task * set_task
void(* GNUNET_ATS_TESTING_ExperimentDoneCallback)(struct Experiment *e, struct GNUNET_TIME_Relative duration, int success)
struct LoggingFileHandle * next
double prop_norm[GNUNET_ATS_PropertyCount]
struct Episode * cur
struct PreferenceGenerator * prev
long long unsigned int aid
long long unsigned int base_rate
uint32_t assigned_bw_in
void(* GNUNET_ATS_TESTING_EpisodeDoneCallback)(struct Episode *e)
long long unsigned int address_id
Internal representation of the hash map.
struct GNUNET_SCHEDULER_Task * episode_timeout_task
struct GNUNET_SCHEDULER_Task * set_task
Entry for a benchmark peer.
struct PropertyGenerator * prev
static struct GNUNET_TIME_Absolute start_time
Start time of the current round; used to determine how long one iteration takes (which influences how...
An operation in an experiment.
struct TestAddress * test_address
Address with additional information.
struct GNUNET_ATS_TEST_Operation * prev
struct LoggingPeer * prev
ats service address management
struct LoggingFileHandle * prev
struct GNUNET_ATS_SolverFunctions * sf
Solver handle.
struct GNUNET_DISK_FileHandle * f_hd
struct GNUNET_CONFIGURATION_Handle * cfg
struct GNUNET_ATS_TEST_Operation * head
struct GNUNET_ATS_TEST_Operation * tail
struct TestAddress * next
struct GNUNET_SCHEDULER_Task * feedback_task
double prop_abs[GNUNET_ATS_PropertyCount]
The identity of the host (wraps the signing key of the peer).
long long unsigned int peer
configuration data
Definition: configuration.c:85
struct TestAddress * addr_head
Automatic transport selection and outbound bandwidth determination.
Entry in list of pending tasks.
Definition: scheduler.c:134
long long unsigned int aid
uint32_t assigned_bw_out
struct LoggingAddress * prev
static struct GNUNET_TIME_Relative duration
How long do we run the test?
struct TestPeer * next
struct TestPeer * test_peer
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
Time for absolute times used by GNUnet, in microseconds.
struct GNUNET_CONTAINER_MultiPeerMap * addresses
Address hashmap.
struct GNUNET_ATS_PluginEnvironment env
Solver environment.
GNUNET_ATS_PreferenceKind
Enum defining all known preference categories.
The ATS plugin will pass a pointer to a struct of this type as to the initialization function of the ...
struct GNUNET_SCHEDULER_Task * logging_task
long long unsigned int max_rate
long long unsigned int address_session
Handle used to access files (and pipes).
long long unsigned int id
Time for relative time used by GNUnet, in microseconds.
char * plugin
Solver plugin name.