1 | #ifdef STATISTICS |
---|
2 | /* |
---|
3 | * $Id: Write_queue_statistics_declaration.cpp 113 2009-04-14 18:39:12Z rosiere $ |
---|
4 | * |
---|
5 | * [ Description ] |
---|
6 | * |
---|
7 | */ |
---|
8 | |
---|
9 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h" |
---|
10 | |
---|
11 | namespace morpheo { |
---|
12 | namespace behavioural { |
---|
13 | namespace core { |
---|
14 | namespace multi_execute_loop { |
---|
15 | namespace execute_loop { |
---|
16 | namespace multi_write_unit { |
---|
17 | namespace write_unit { |
---|
18 | namespace write_queue { |
---|
19 | |
---|
20 | |
---|
21 | #undef FUNCTION |
---|
22 | #define FUNCTION "Write_queue::statistics_declaration" |
---|
23 | void Write_queue::statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics) |
---|
24 | { |
---|
25 | log_printf(FUNC,Write_queue,FUNCTION,"Begin"); |
---|
26 | |
---|
27 | _stat = new Stat (static_cast<std::string>(_name), |
---|
28 | _param->_type, |
---|
29 | param_statistics); |
---|
30 | |
---|
31 | _stat_use_queue = _stat->create_variable("use_queue"); |
---|
32 | _stat_average_use_queue = _stat->create_counter ("average_use_queue", "" , "Average by cycle of the write_queue occupation."); |
---|
33 | _stat_percent_use_queue = _stat->create_counter ("percent_use_queue", "%", "Percent of write_queue usage."); |
---|
34 | |
---|
35 | _stat->create_expr("average_use_queue", "/ use_queue cycle" , false); |
---|
36 | _stat->create_expr("percent_use_queue", "/ * average_use_queue 100 "+toString(_param->_size_queue), false); |
---|
37 | |
---|
38 | |
---|
39 | log_printf(FUNC,Write_queue,FUNCTION,"End"); |
---|
40 | }; |
---|
41 | |
---|
42 | }; // end namespace write_queue |
---|
43 | }; // end namespace write_unit |
---|
44 | }; // end namespace multi_write_unit |
---|
45 | }; // end namespace execute_loop |
---|
46 | }; // end namespace multi_execute_loop |
---|
47 | }; // end namespace core |
---|
48 | |
---|
49 | }; // end namespace behavioural |
---|
50 | }; // end namespace morpheo |
---|
51 | #endif |
---|