8.3
general documentation
cs_timer_stats.h
Go to the documentation of this file.
1#ifndef __CS_TIMER_STATS_H__
2#define __CS_TIMER_STATS_H__
3
4/*============================================================================
5 * Application timer statistics and graphs
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2024 EDF S.A.
12
13 This program is free software; you can redistribute it and/or modify it under
14 the terms of the GNU General Public License as published by the Free Software
15 Foundation; either version 2 of the License, or (at your option) any later
16 version.
17
18 This program is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21 details.
22
23 You should have received a copy of the GNU General Public License along with
24 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25 Street, Fifth Floor, Boston, MA 02110-1301, USA.
26*/
27
28/*----------------------------------------------------------------------------*/
29
30/*----------------------------------------------------------------------------
31 * Local headers
32 *----------------------------------------------------------------------------*/
33
34#include "cs_defs.h"
35#include "cs_timer.h"
36#include "cs_time_plot.h"
37
38/*----------------------------------------------------------------------------*/
39
41
42/*============================================================================
43 * Public types
44 *============================================================================*/
45
46/*============================================================================
47 * Public function prototypes
48 *============================================================================*/
49
50/*----------------------------------------------------------------------------*/
58/*----------------------------------------------------------------------------*/
59
60void
62
63/*----------------------------------------------------------------------------*/
67/*----------------------------------------------------------------------------*/
68
69void
71
72/*----------------------------------------------------------------------------*/
81/*----------------------------------------------------------------------------*/
82
83void
85
86/*----------------------------------------------------------------------------*/
100/*----------------------------------------------------------------------------*/
101
102void
104 int frequency,
105 int n_buffer_steps,
106 double flush_wtime);
107
108/*----------------------------------------------------------------------------*/
112/*----------------------------------------------------------------------------*/
113
114void
116
117/*----------------------------------------------------------------------------*/
127/*----------------------------------------------------------------------------*/
128
129int
130cs_timer_stats_create(const char *parent_name,
131 const char *name,
132 const char *label);
133
134/*----------------------------------------------------------------------------*/
144/*----------------------------------------------------------------------------*/
145
146int
147cs_timer_stats_id_by_name(const char *name);
148
149/*----------------------------------------------------------------------------*/
162/*----------------------------------------------------------------------------*/
163
164void
166 int plot);
167
168/*----------------------------------------------------------------------------*/
176/*----------------------------------------------------------------------------*/
177
178int
180
181/*----------------------------------------------------------------------------*/
193/*----------------------------------------------------------------------------*/
194
195void
197
198/*----------------------------------------------------------------------------*/
206/*----------------------------------------------------------------------------*/
207
208void
209cs_timer_stats_stop(int id);
210
211/*----------------------------------------------------------------------------*/
221/*----------------------------------------------------------------------------*/
222
223int
225
226/*----------------------------------------------------------------------------*/
237/*----------------------------------------------------------------------------*/
238
239void
241 const cs_timer_t *t0,
242 const cs_timer_t *t1);
243
244/*----------------------------------------------------------------------------*/
252/*----------------------------------------------------------------------------*/
253
254void
256
257/*----------------------------------------------------------------------------*/
258
260
261#endif /* __CS_TIMER_STATS_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
#define END_C_DECLS
Definition: cs_defs.h:543
cs_time_plot_format_t
Definition: cs_time_plot.h:56
int cs_timer_stats_id_by_name(const char *name)
Return the id of a defined statistic based on its name.
Definition: cs_timer_stats.cpp:557
void cs_timer_stats_initialize(void)
Initialize timer statistics handling.
Definition: cs_timer_stats.cpp:297
int cs_timer_stats_is_active(int id)
indicate if a timer for a given statistic is currently active.
Definition: cs_timer_stats.cpp:598
void cs_timer_stats_stop(int id)
Stop a timer for a given statistic.
Definition: cs_timer_stats.cpp:669
void cs_timer_stats_increment_time_step(void)
Increment time step for timer statistics.
Definition: cs_timer_stats.cpp:406
void cs_timer_stats_define_defaults(void)
Define default timer statistics.
Definition: cs_timer_stats.cpp:797
void cs_timer_stats_start(int id)
Start a timer for a given statistic.
Definition: cs_timer_stats.cpp:624
void cs_timer_stats_set_plot(int id, int plot)
Enable or disable plotting for a timer statistic.
Definition: cs_timer_stats.cpp:578
int cs_timer_stats_create(const char *parent_name, const char *name, const char *label)
Create a timer statistics structure.
Definition: cs_timer_stats.cpp:456
void cs_timer_stats_set_start_time(int time_id)
Set a start time for time stats.
Definition: cs_timer_stats.cpp:362
void cs_timer_stats_set_plot_options(cs_time_plot_format_t format, int frequency, int n_buffer_steps, double flush_wtime)
Set global timer statistics plot options.
Definition: cs_timer_stats.cpp:387
void cs_timer_stats_add_diff(int id, const cs_timer_t *t0, const cs_timer_t *t1)
Add a timing range to an inactive timer.
Definition: cs_timer_stats.cpp:774
void cs_timer_stats_finalize(void)
Finalize timer statistics handling.
Definition: cs_timer_stats.cpp:325
int cs_timer_stats_switch(int id)
Start a timer for a given statistic, stopping previous timers of the same type which are not a parent...
Definition: cs_timer_stats.cpp:707
real(c_double), pointer, save t0
reference temperature.
Definition: cstphy.f90:217
char * label
Definition: keywords.h:58
Definition: cs_timer.h:46