blob: 7edab2936951900b11fdb3c24837faed97172047 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
// Copyright (C) by Josh Blum. See LICENSE.txt for licensing information.
#ifndef INCLUDED_LIBGRAS_IMPL_STATS_HPP
#define INCLUDED_LIBGRAS_IMPL_STATS_HPP
#include <gras/chrono.hpp>
#include <vector>
namespace gras
{
struct BlockStats
{
BlockStats(void)
{
init_time = time_now();
start_time = 0;
stop_time = 0;
work_count = 0;
time_last_work = 0;
total_time_prep = 0;
total_time_work = 0;
total_time_post = 0;
total_time_input = 0;
total_time_output = 0;
}
time_ticks_t init_time;
time_ticks_t start_time;
time_ticks_t stop_time;
//overall tracking of ports
std::vector<item_index_t> items_consumed;
std::vector<item_index_t> tags_consumed;
std::vector<item_index_t> msgs_consumed;
std::vector<item_index_t> items_produced;
std::vector<item_index_t> tags_produced;
std::vector<item_index_t> msgs_produced;
//instantaneous port status
std::vector<size_t> items_enqueued;
std::vector<size_t> msgs_enqueued;
std::vector<size_t> tags_enqueued;
item_index_t work_count;
time_ticks_t time_last_work;
time_ticks_t total_time_prep;
time_ticks_t total_time_work;
time_ticks_t total_time_post;
time_ticks_t total_time_input;
time_ticks_t total_time_output;
};
} //namespace gras
#endif /*INCLUDED_LIBGRAS_IMPL_STATS_HPP*/
|