Couchbase C Client  3.3.14
Asynchronous C Client for Couchbase
iometrics.h
1/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2/*
3 * Copyright 2017-2020 Couchbase, Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#ifndef LCB_IOMETRICS_H
19#define LCB_IOMETRICS_H
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25struct lcb_METRICS_st;
26
27typedef struct lcb_IOMETRICS_st {
28 const char *hostport;
29 lcb_SIZE io_close;
30 lcb_SIZE io_error;
31 lcb_SIZE bytes_sent;
32 lcb_SIZE bytes_received;
33} lcb_IOMETRICS;
34
35typedef struct lcb_SERVERMETRICS_st {
37 lcb_IOMETRICS iometrics;
38
40 lcb_SIZE packets_sent;
41
43 lcb_SIZE packets_read;
44
46 lcb_SIZE packets_queued;
47
49 lcb_SIZE bytes_queued;
50
55 lcb_SIZE packets_errored;
56
58 lcb_SIZE packets_timeout;
59
61 lcb_SIZE packets_ownerless;
62
64 lcb_SIZE packets_nmv;
65} lcb_SERVERMETRICS;
66
67typedef struct lcb_METRICS_st {
68 lcb_SIZE nservers;
69 const lcb_SERVERMETRICS **servers;
70
72 lcb_SIZE packets_retried;
73} lcb_METRICS;
74
75#ifdef __cplusplus
76}
77#endif /* __cplusplus */
78#endif // LCB_IOMETRICS_H