Kea 2.5.8
lease_file_stats.h
Go to the documentation of this file.
1// Copyright (C) 2015-2017 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef LEASE_FILE_STATS_H
8#define LEASE_FILE_STATS_H
9
10namespace isc {
11namespace dhcp {
12
19public:
25 }
26
29 }
30
32 uint32_t getReads() const {
33 return (reads_);
34 }
35
37 uint32_t getReadLeases() const {
38 return (read_leases_);
39 }
40
42 uint32_t getReadErrs() const {
43 return (read_errs_);
44 }
45
47 uint32_t getWrites() const {
48 return (writes_);
49 }
50
52 uint32_t getWriteLeases() const {
53 return (write_leases_);
54 }
55
57 uint32_t getWriteErrs() const {
58 return (write_errs_);
59 }
60
63 reads_ = 0;
64 read_leases_ = 0;
65 read_errs_ = 0;
66 writes_ = 0;
67 write_leases_ = 0;
68 write_errs_ = 0;
69 }
70
71protected:
73 uint32_t reads_;
74
76 uint32_t read_leases_;
77
79 uint32_t read_errs_;
80
82 uint32_t writes_;
83
85 uint32_t write_leases_;
86
88 uint32_t write_errs_;
89};
90
91} // namespace dhcp
92} // namespace isc
93
94#endif // LEASE_FILE_STATS_H
Provides statistics for leases.
uint32_t getWriteErrs() const
Gets the number of errors when writing leases.
uint32_t getReadLeases() const
Gets the number of leases read.
uint32_t write_leases_
Number of lease written.
uint32_t getWriteLeases() const
Gets the number of leases written.
uint32_t getReadErrs() const
Gets the number of errors when reading leases.
uint32_t read_leases_
Number of leases read.
uint32_t reads_
Number of attempts to read a lease.
void clearStatistics()
Clears the statistics.
uint32_t writes_
Number of attempts to write a lease.
uint32_t getWrites() const
Gets the number of attempts to write a lease.
uint32_t write_errs_
Number of errors when writing.
uint32_t read_errs_
Number of errors when reading.
uint32_t getReads() const
Gets the number of attempts to read a lease.
Defines the logger used by the top-level component of kea-lfc.