Commit | Line | Data |
---|---|---|
cdce23b3 BP |
1 | /* This file is part of the Linux Trace Toolkit viewer |
2 | * Copyright (C) 2009 Benjamin Poirier <benjamin.poirier@polymtl.ca> | |
3 | * | |
4 | * This program is free software; you can redistribute it and/or modify | |
5 | * it under the terms of the GNU General Public License Version 2 as | |
6 | * published by the Free Software Foundation; | |
7 | * | |
8 | * This program is distributed in the hope that it will be useful, | |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | * GNU General Public License for more details. | |
12 | * | |
13 | * You should have received a copy of the GNU General Public License | |
14 | * along with this program; if not, write to the Free Software | |
15 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, | |
16 | * MA 02111-1307, USA. | |
17 | */ | |
18 | ||
19 | #ifndef EVENT_ANALYSIS_EVAL_H | |
20 | #define EVENT_ANALYSIS_EVAL_H | |
21 | ||
22 | #include <glib.h> | |
23 | ||
24 | #include "data_structures.h" | |
25 | ||
26 | ||
d4721e1a BP |
27 | struct RttKey |
28 | { | |
29 | uint32_t saddr, daddr; | |
30 | }; | |
31 | ||
cdce23b3 BP |
32 | typedef struct |
33 | { | |
34 | unsigned int inversionNb, | |
35 | tooFastNb, | |
76be6fc2 BP |
36 | noRTTInfoNb, |
37 | total; | |
38 | } MessageStats; | |
cdce23b3 BP |
39 | |
40 | typedef struct | |
41 | { | |
42 | double broadcastDiffSum; | |
76be6fc2 BP |
43 | unsigned int broadcastNb; |
44 | ||
e072e1ab | 45 | // MessageStats messageStats[traceNb][traceNb] |
76be6fc2 | 46 | MessageStats** messageStats; |
e072e1ab | 47 | |
d4721e1a BP |
48 | /* double* exchangeRtt[RttKey] |
49 | * For this table, saddr and daddr are swapped as necessary such that | |
50 | * saddr < daddr */ | |
51 | GHashTable* exchangeRtt; | |
cdce23b3 BP |
52 | } AnalysisStatsEval; |
53 | ||
e072e1ab BP |
54 | |
55 | #define BIN_NB 1001 | |
56 | struct Bins | |
57 | { | |
58 | // index of min and max bins that are != 0 | |
59 | uint32_t min, max; | |
60 | // sum of all bins | |
61 | uint32_t total; | |
62 | /* bin[0]: underflow ]-INFINITY..0[ | |
63 | * bin[1]: [0..1e-6[ | |
64 | * rest defined exponentially, see binStart() | |
65 | * bin[BIN_NB - 1]: overflow [1..INFINITY[ */ | |
66 | uint32_t bin[BIN_NB]; | |
67 | }; | |
68 | ||
69 | ||
4ee223e5 BP |
70 | typedef struct |
71 | { | |
e072e1ab BP |
72 | /* File pointers to files where "trip times" (message latency) histogram |
73 | * values are outputted. Each host-pair has two files, one for each | |
74 | * message direction. As for traces, the host with the smallest address | |
75 | * is considered to be the reference for the direction of messages (ie. | |
76 | * messages from the host with the lowest address to the host with the | |
77 | * largest address are "sent"). */ | |
78 | FILE* ttSendPoints; | |
79 | FILE* ttRecvPoints; | |
80 | ||
81 | struct Bins ttSendBins; | |
82 | struct Bins ttRecvBins; | |
83 | ||
84 | /* File pointers to files where half round trip times (evaluated from | |
85 | * exchanges) histogram values are outputted. */ | |
86 | FILE* hrttPoints; | |
87 | ||
88 | struct Bins hrttBins; | |
89 | } AnalysisGraphEval; | |
4ee223e5 | 90 | |
cdce23b3 BP |
91 | typedef struct |
92 | { | |
2bd4b3e4 | 93 | // double* rttInfo[RttKey] |
cdce23b3 BP |
94 | GHashTable* rttInfo; |
95 | ||
96 | AnalysisStatsEval* stats; | |
e072e1ab BP |
97 | /* AnalysisGraphsEval* graphs[RttKey]; |
98 | * For this table, saddr and daddr are swapped as necessary such that | |
99 | * saddr < daddr */ | |
100 | GHashTable* graphs; | |
cdce23b3 BP |
101 | } AnalysisDataEval; |
102 | ||
103 | #endif |