GNUnet  0.11.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 
104 {
107 
108  struct LoggingPeer *head;
109  struct LoggingPeer *tail;
110 
111  struct GNUNET_TIME_Absolute timestamp;
113 };
114 
116 {
117  struct LoggingPeer *prev;
118  struct LoggingPeer *next;
119 
120  long long unsigned int id;
122  double pref_abs[GNUNET_ATS_PREFERENCE_END];
123  double pref_norm[GNUNET_ATS_PREFERENCE_END];
125 
128 };
129 
131 {
134 
135  long long unsigned int aid;
136  int active;
137  uint32_t network;
138  uint32_t assigned_bw_in;
139  uint32_t assigned_bw_out;
140 
141  double prop_abs[GNUNET_ATS_PropertyCount];
142  double prop_norm[GNUNET_ATS_PropertyCount];
143 };
144 
145 
146 struct TestPeer
147 {
148  struct TestPeer *prev;
149  struct TestPeer *next;
150 
151 
152  long long unsigned int id;
155 
156  double pref_abs[GNUNET_ATS_PreferenceCount];
157  double pref_norm[GNUNET_ATS_PreferenceCount];
158 
159  uint32_t assigned_bw_in;
160  uint32_t assigned_bw_out;
161 
164 };
165 
166 
168 {
169  struct TestAddress *next;
170  struct TestAddress *prev;
171 
172  long long unsigned int aid;
174  uint32_t network;
175 
176  double prop_abs[GNUNET_ATS_PropertyCount];
177  double prop_norm[GNUNET_ATS_PropertyCount];
178 };
179 
180 struct Episode;
181 
182 struct Experiment;
183 
185  struct Episode *e);
186 
188  struct
190  duration, int
191  success);
192 
197 {
200 
201  long long unsigned int address_id;
202  long long unsigned int peer_id;
203  long long unsigned int client_id;
204 
205  long long unsigned int address_session;
206  unsigned int address_network;
207  char*address;
208  char*plugin;
209 
210 
211  long long unsigned int base_rate;
212  long long unsigned int max_rate;
213  struct GNUNET_TIME_Relative period;
214  struct GNUNET_TIME_Relative frequency;
215  struct GNUNET_TIME_Relative feedback_delay;
216 
218  enum GeneratorType gen_type;
220  // enum GNUNET_ATS_Property prop_type;
221 };
222 
223 struct Episode
224 {
225  int id;
226  struct Episode *next;
228 
231 };
232 
234 {
236  struct GNUNET_TIME_Relative log_freq;
237 
238  /* DLL list for logging time steps */
241 };
242 
244 {
245  char *name;
246  char *log_prefix;
247  char *cfg_file;
250 
251  struct GNUNET_TIME_Relative log_freq;
252  struct GNUNET_TIME_Relative max_duration;
253  struct GNUNET_TIME_Relative total_duration;
255  unsigned int num_episodes;
256  struct Episode *start;
257 
259 
262  struct Episode *cur;
263 
266 };
267 
269 {
272 
274 
275  long long unsigned int peer;
276  unsigned int client_id;
277 
279 
280  long int base_value;
281  long int max_value;
282  struct GNUNET_TIME_Relative duration_period;
283  struct GNUNET_TIME_Relative frequency;
284  struct GNUNET_TIME_Relative feedback_frequency;
285 
288  struct GNUNET_TIME_Absolute next_ping_transmission;
289  struct GNUNET_TIME_Absolute time_start;
290 
291 
292  /* Feedback */
296 
297  double pref_bw_old;
299 
300  struct GNUNET_TIME_Absolute feedback_last;
301 
302  struct GNUNET_TIME_Absolute feedback_last_bw_update;
303  struct GNUNET_TIME_Absolute feedback_last_delay_update;
307 };
308 
309 
311 {
314 
316 
317  long long unsigned int peer;
318  long long unsigned int address_id;
319 
322  uint32_t ats_property;
323 
324  long int base_value;
325  long int max_value;
326  struct GNUNET_TIME_Relative duration_period;
327  struct GNUNET_TIME_Relative frequency;
328 
330  struct GNUNET_TIME_Absolute next_ping_transmission;
331  struct GNUNET_TIME_Absolute time_start;
332 };
333 
334 #endif /* #ifndef GNUNET_ATS_SOLVER_EVAL_H */
335 /* 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.