My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
controller_stats.h
Go to the documentation of this file.
1 /*
2 START OF LICENSE STUB
3  DeDOS: Declarative Dispersion-Oriented Software
4  Copyright (C) 2017 University of Pennsylvania, Georgetown University
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 END OF LICENSE STUB
19 */
20 #ifndef MSU_STATS_H_
21 #define MSU_STATS_H_
22 
23 #include "timeseries.h"
24 #include "stats.h"
25 #include "dfg.h"
26 #include "unused_def.h"
27 
28 struct stat_item {
29  unsigned int id;
30  struct timed_rrdb stats;
31 };
32 
33 #define MAX_STAT_ID 4192
34 
35 
36 struct timed_rrdb *get_msu_stat(enum stat_id id, unsigned int msu_id);
37 struct timed_rrdb *get_thread_stat(enum stat_id id, unsigned int thread_id, unsigned int runtime_id);
38 
39 int unregister_msu_stats(unsigned int msu_id);
40 int register_msu_stats(unsigned int msu_id, int msu_type_id, int thread_id, int runtime_id);
41 int unregister_thread_stats(unsigned int thread_id, unsigned int runtime_id);
42 int register_thread_stats(unsigned int thread_id, unsigned int runtime_id);
43 int init_statistics();
44 
45 void show_stats(struct dfg_msu *msu);
46 
47 #endif
Round-robin database (circular buffer) for storing timeseries data.
Definition: timeseries.h:36
struct timed_rrdb * get_msu_stat(enum stat_id id, unsigned int msu_id)
Macro for declaring functions or variables as unused to avoid compiler warnings.
void show_stats(struct dfg_msu *msu)
int register_msu_stats(unsigned int msu_id, int msu_type_id, int thread_id, int runtime_id)
stat_id
The identifiers with which stats can be logged.
Definition: stat_ids.h:32
unsigned int id
A unique identifier for the item being logged.
Definition: rt_stats.c:52
int register_thread_stats(unsigned int thread_id, unsigned int runtime_id)
Functions for the sending and receiving of statistics between ctrl and runtime.
int init_statistics()
Initializes the entire stats module.
Definition: rt_stats.c:783
The internal statistics structure where stats are aggregated One per statistic-item.
Definition: rt_stats.c:50
Representation of a single MSU in the dfg.
Definition: dfg.h:216
int unregister_thread_stats(unsigned int thread_id, unsigned int runtime_id)
Interfaces for the creation and modification of the data-flow-graph and and general description of th...
struct timed_stat * stats
Timestamp and data for each gathered statistic.
Definition: rt_stats.c:55
static int runtime_id(int runtime_fd)
int unregister_msu_stats(unsigned int msu_id)
struct timed_rrdb * get_thread_stat(enum stat_id id, unsigned int thread_id, unsigned int runtime_id)