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 
42 };
43 
44 
54 };
55 
56 struct SolverHandle {
60  char *plugin;
61 
66 
71 
76 };
77 
82 };
83 
85  /* DLL list for logging time steps */
88 
89  /* peer id */
90  long long unsigned int pid;
91 
92  /* address id */
93  long long unsigned int aid;
94 
96 };
97 
101 
102  struct LoggingPeer *head;
103  struct LoggingPeer *tail;
104 
105  struct GNUNET_TIME_Absolute timestamp;
107 };
108 
109 struct LoggingPeer {
110  struct LoggingPeer *prev;
111  struct LoggingPeer *next;
112 
113  long long unsigned int id;
115  double pref_abs[GNUNET_ATS_PREFERENCE_END];
116  double pref_norm[GNUNET_ATS_PREFERENCE_END];
118 
121 };
122 
126 
127  long long unsigned int aid;
128  int active;
129  uint32_t network;
130  uint32_t assigned_bw_in;
131  uint32_t assigned_bw_out;
132 
133  double prop_abs[GNUNET_ATS_PropertyCount];
134  double prop_norm[GNUNET_ATS_PropertyCount];
135 };
136 
137 
138 struct TestPeer {
139  struct TestPeer *prev;
140  struct TestPeer *next;
141 
142 
143  long long unsigned int id;
146 
147  double pref_abs[GNUNET_ATS_PreferenceCount];
148  double pref_norm[GNUNET_ATS_PreferenceCount];
149 
150  uint32_t assigned_bw_in;
151  uint32_t assigned_bw_out;
152 
155 };
156 
157 
158 struct TestAddress {
159  struct TestAddress *next;
160  struct TestAddress *prev;
161 
162  long long unsigned int aid;
164  uint32_t network;
165 
166  double prop_abs[GNUNET_ATS_PropertyCount];
167  double prop_norm[GNUNET_ATS_PropertyCount];
168 };
169 
170 struct Episode;
171 
172 struct Experiment;
173 
175  struct Episode *e);
176 
178  struct GNUNET_TIME_Relative duration, int success);
179 
186 
187  long long unsigned int address_id;
188  long long unsigned int peer_id;
189  long long unsigned int client_id;
190 
191  long long unsigned int address_session;
192  unsigned int address_network;
193  char*address;
194  char*plugin;
195 
196 
197  long long unsigned int base_rate;
198  long long unsigned int max_rate;
199  struct GNUNET_TIME_Relative period;
200  struct GNUNET_TIME_Relative frequency;
201  struct GNUNET_TIME_Relative feedback_delay;
202 
204  enum GeneratorType gen_type;
206  // enum GNUNET_ATS_Property prop_type;
207 };
208 
209 struct Episode {
210  int id;
211  struct Episode *next;
213 
216 };
217 
220  struct GNUNET_TIME_Relative log_freq;
221 
222  /* DLL list for logging time steps */
225 };
226 
227 struct Experiment {
228  char *name;
229  char *log_prefix;
230  char *cfg_file;
233 
234  struct GNUNET_TIME_Relative log_freq;
235  struct GNUNET_TIME_Relative max_duration;
236  struct GNUNET_TIME_Relative total_duration;
238  unsigned int num_episodes;
239  struct Episode *start;
240 
242 
245  struct Episode *cur;
246 
249 };
250 
254 
256 
257  long long unsigned int peer;
258  unsigned int client_id;
259 
261 
262  long int base_value;
263  long int max_value;
264  struct GNUNET_TIME_Relative duration_period;
265  struct GNUNET_TIME_Relative frequency;
266  struct GNUNET_TIME_Relative feedback_frequency;
267 
270  struct GNUNET_TIME_Absolute next_ping_transmission;
271  struct GNUNET_TIME_Absolute time_start;
272 
273 
274  /* Feedback */
278 
279  double pref_bw_old;
281 
282  struct GNUNET_TIME_Absolute feedback_last;
283 
284  struct GNUNET_TIME_Absolute feedback_last_bw_update;
285  struct GNUNET_TIME_Absolute feedback_last_delay_update;
289 };
290 
291 
295 
297 
298  long long unsigned int peer;
299  long long unsigned int address_id;
300 
303  uint32_t ats_property;
304 
305  long int base_value;
306  long int max_value;
307  struct GNUNET_TIME_Relative duration_period;
308  struct GNUNET_TIME_Relative frequency;
309 
311  struct GNUNET_TIME_Absolute next_ping_transmission;
312  struct GNUNET_TIME_Absolute time_start;
313 };
314 
315 #endif /* #ifndef GNUNET_ATS_SOLVER_EVAL_H */
316 /* 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:83
struct TestAddress * addr_head
Automatic transport selection and outbound bandwidth determination.
Entry in list of pending tasks.
Definition: scheduler.c:131
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.