Line data Source code
1 1 : /** 2 : * @file log/stats.h 3 : * 4 : * @brief Statistics module 5 : * 6 : * All the facilities to collect, gather, and dump statistics are implemented 7 : * in this module. 8 : * 9 : * SPDX-FileCopyrightText: 2008-2021 HPDCS Group <rootsim@googlegroups.com> 10 : * SPDX-License-Identifier: GPL-3.0-only 11 : */ 12 : #pragma once 13 : 14 : #include <core/core.h> 15 : 16 0 : enum stats_global_time { 17 : STATS_GLOBAL_INIT_END, 18 : STATS_GLOBAL_EVENTS_START, 19 : STATS_GLOBAL_EVENTS_END, 20 : STATS_GLOBAL_FINI_START, 21 : STATS_GLOBAL_COUNT 22 : }; 23 : 24 0 : enum stats_time { 25 : STATS_MSG_PROCESSED, 26 : STATS_GVT, 27 : STATS_ROLLBACK, 28 : STATS_MSG_SILENT, 29 : STATS_COUNT 30 : }; 31 : 32 1 : extern void stats_global_time_start(void); 33 1 : extern void stats_global_time_take(enum stats_global_time this_stat); 34 : 35 1 : extern void stats_global_init(void); 36 1 : extern void stats_global_fini(void); 37 1 : extern void stats_init(void); 38 : 39 0 : extern void stats_time_start(enum stats_time this_stat); 40 0 : extern void stats_time_take(enum stats_time this_stat); 41 0 : extern void stats_on_gvt(simtime_t current_gvt); 42 0 : extern void stats_dump(void);