OpenDNSSEC-signer 2.1.12
stats.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009 NLNet Labs. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
17 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
19 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
21 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
22 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
23 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 */
26
27#ifndef SIGNER_STATS_H
28#define SIGNER_STATS_H
29
30#include "config.h"
31#include <ctype.h>
32#include <stdint.h>
33#include <time.h>
34#ifdef HAVE_SYS_TYPES_H
35# include <sys/types.h>
36#endif
37#ifdef HAVE_UNISTD_H
38# include <unistd.h>
39#endif
40
41#include <ldns/ldns.h>
42
43typedef struct stats_struct stats_type;
44
45#include "locks.h"
46
51 uint32_t sort_count;
52 time_t sort_time;
54 uint32_t nsec_count;
55 time_t nsec_time;
56 uint32_t sig_count;
57 uint32_t sig_soa_count;
58 uint32_t sig_reuse;
59 time_t sig_time;
60 time_t audit_time;
61 time_t start_time;
62 time_t end_time;
63 pthread_mutex_t stats_lock;
64};
65
71extern stats_type* stats_create(void);
72
81extern void stats_log(stats_type* stats, const char* name, uint32_t serial,
82 ldns_rr_type nsec_type);
83
89extern void stats_clear(stats_type* stats);
90
96extern void stats_cleanup(stats_type* stats);
97
98#endif /* SIGNER_STATS_H */
void stats_log(stats_type *stats, const char *name, uint32_t serial, ldns_rr_type nsec_type)
Definition: stats.c:76
stats_type * stats_create(void)
Definition: stats.c:40
void stats_clear(stats_type *stats)
Definition: stats.c:54
void stats_cleanup(stats_type *stats)
Definition: stats.c:106
uint32_t sig_reuse
Definition: stats.h:58
pthread_mutex_t stats_lock
Definition: stats.h:63
uint32_t sig_soa_count
Definition: stats.h:57
time_t sig_time
Definition: stats.h:59
uint32_t sig_count
Definition: stats.h:56
int sort_done
Definition: stats.h:53
time_t end_time
Definition: stats.h:62
time_t nsec_time
Definition: stats.h:55
uint32_t sort_count
Definition: stats.h:51
time_t sort_time
Definition: stats.h:52
time_t start_time
Definition: stats.h:61
uint32_t nsec_count
Definition: stats.h:54
time_t audit_time
Definition: stats.h:60