JULEA
jstatistics.h
Go to the documentation of this file.
1 /*
2  * JULEA - Flexible storage framework
3  * Copyright (C) 2010-2024 Michael Kuhn
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
23 #ifndef JULEA_STATISTICS_H
24 #define JULEA_STATISTICS_H
25 
26 #if !defined(JULEA_H) && !defined(JULEA_COMPILATION)
27 #error "Only <julea.h> can be included directly."
28 #endif
29 
30 #include <glib.h>
31 
32 G_BEGIN_DECLS
33 
41 {
50 };
51 
52 typedef enum JStatisticsType JStatisticsType;
53 
54 struct JStatistics;
55 
56 typedef struct JStatistics JStatistics;
57 
73 JStatistics* j_statistics_new(gboolean trace);
74 
85 void j_statistics_free(JStatistics* statistics);
86 
100 guint64 j_statistics_get(JStatistics* statistics, JStatisticsType type);
101 
115 void j_statistics_add(JStatistics* statistics, JStatisticsType type, guint64 value);
116 
121 G_END_DECLS
122 
123 #endif
JStatisticsType
Definition: jstatistics.h:41
@ J_STATISTICS_FILES_STATED
Definition: jstatistics.h:44
@ J_STATISTICS_BYTES_RECEIVED
Definition: jstatistics.h:48
@ J_STATISTICS_BYTES_READ
Definition: jstatistics.h:46
@ J_STATISTICS_BYTES_SENT
Definition: jstatistics.h:49
@ J_STATISTICS_SYNC
Definition: jstatistics.h:45
@ J_STATISTICS_FILES_CREATED
Definition: jstatistics.h:42
@ J_STATISTICS_FILES_DELETED
Definition: jstatistics.h:43
@ J_STATISTICS_BYTES_WRITTEN
Definition: jstatistics.h:47
Definition: jstatistics.c:40
gboolean trace
Definition: jstatistics.c:44