Code Coverage: vinyl-cache/lib/libvsc/VSC_vcp.c
 
82217aa4fc7094b3610340078afaf78cd95a8ec9
 
0
/*
1
 * NB:  This file is machine generated, DO NOT EDIT!
2
 *
3
 * Edit vcp.vsc and run lib/libvsc/vsctool.py instead.
4
 */
5
6
#include "config.h"
7
#include <stdio.h>
8
#include <stdarg.h>
9
#include "vdef.h"
10
#include "vas.h"
11
#include "vrt.h"
12
#include "VSC_vcp.h"
13
14
static const char vsc_vcp_name[] = "VCP";
15
16
#define PARANOIA(a,n)                           \
17
    v_static_assert(                            \
18
        offsetof(struct VSC_vcp, a) == n,       \
19
        "VSC element '" #a "' at wrong offset")
20
21
PARANOIA(ref_hit, 0);
22
PARANOIA(ref_miss, 8);
23
#undef PARANOIA
24
25
static const unsigned char vsc_vcp_json[668] = {
26
        123,34,118,101,114,115,105,111,110,34,58,34,49,34,44,34,110,97,109,101,
27
        34,58,34,118,99,112,34,44,34,111,110,101,108,105,110,101,114,34,58,34,
28
        67,111,110,110,101,99,116,105,111,110,32,80,111,111,108,32,99,111,117,
29
        110,116,101,114,115,34,44,34,111,114,100,101,114,34,58,56,48,44,34,100,
30
        111,99,115,34,58,34,34,44,34,101,108,101,109,101,110,116,115,34,58,50,
31
        44,34,101,108,101,109,34,58,123,34,114,101,102,95,104,105,116,34,58,
32
        123,34,116,121,112,101,34,58,34,99,111,117,110,116,101,114,34,44,34,
33
        99,116,121,112,101,34,58,34,117,105,110,116,54,52,95,116,34,44,34,108,
34
        101,118,101,108,34,58,34,100,101,98,117,103,34,44,34,111,110,101,108,
35
        105,110,101,114,34,58,34,78,117,109,98,101,114,32,111,102,32,116,105,
36
        109,101,115,32,119,101,32,104,97,118,101,32,102,111,117,110,100,32,97,
37
        110,32,101,120,105,115,116,105,110,103,32,99,111,110,110,46,32,112,111,
38
        111,108,34,44,34,102,111,114,109,97,116,34,58,34,105,110,116,101,103,
39
        101,114,34,44,34,105,110,100,101,120,34,58,48,44,34,110,97,109,101,34,
40
        58,34,114,101,102,95,104,105,116,34,44,34,100,111,99,115,34,58,34,92,
41
        116,78,117,109,98,101,114,32,111,102,32,116,105,109,101,115,32,119,101,
42
        32,104,97,118,101,32,102,111,117,110,100,32,97,110,32,101,120,105,115,
43
        116,105,110,103,32,99,111,110,110,101,99,116,105,111,110,32,112,111,
44
        111,108,32,119,104,105,108,101,32,99,114,101,97,116,105,110,103,92,110,
45
        92,116,97,32,98,97,99,107,101,110,100,46,34,125,44,34,114,101,102,95,
46
        109,105,115,115,34,58,123,34,116,121,112,101,34,58,34,99,111,117,110,
47
        116,101,114,34,44,34,99,116,121,112,101,34,58,34,117,105,110,116,54,
48
        52,95,116,34,44,34,108,101,118,101,108,34,58,34,100,101,98,117,103,34,
49
        44,34,111,110,101,108,105,110,101,114,34,58,34,78,117,109,98,101,114,
50
        32,111,102,32,116,105,109,101,115,32,119,101,32,104,97,118,101,32,110,
51
        111,116,32,102,111,117,110,100,32,97,110,32,101,120,105,115,116,105,
52
        110,103,32,99,111,110,110,46,32,112,111,111,108,34,44,34,102,111,114,
53
        109,97,116,34,58,34,105,110,116,101,103,101,114,34,44,34,105,110,100,
54
        101,120,34,58,56,44,34,110,97,109,101,34,58,34,114,101,102,95,109,105,
55
        115,115,34,44,34,100,111,99,115,34,58,34,92,116,78,117,109,98,101,114,
56
        32,111,102,32,116,105,109,101,115,32,119,101,32,104,97,118,101,32,110,
57
        111,116,32,102,111,117,110,100,32,97,110,32,101,120,105,115,116,105,
58
        110,103,32,99,111,110,110,101,99,116,105,111,110,32,112,111,111,108,
59
        32,119,104,105,108,101,92,110,92,116,99,114,101,97,116,105,110,103,32,
60
        97,32,98,97,99,107,101,110,100,46,34,125,125,125,0
61
};
62
63
// {
64
//   "version": "1",
65
//   "name": "vcp",
66
//   "oneliner": "Connection Pool counters",
67
//   "order": 80,
68
//   "docs": "",
69
//   "elements": 2,
70
//   "elem": {
71
//     "ref_hit": {
72
//       "type": "counter",
73
//       "ctype": "uint64_t",
74
//       "level": "debug",
75
//       "oneliner": "Number of times we have found an existing conn. po[...]
76
//       "format": "integer",
77
//       "index": 0,
78
//       "name": "ref_hit",
79
//       "docs": "\tNumber of times we have found an existing connection[...]
80
//     },
81
//     "ref_miss": {
82
//       "type": "counter",
83
//       "ctype": "uint64_t",
84
//       "level": "debug",
85
//       "oneliner": "Number of times we have not found an existing conn[...]
86
//       "format": "integer",
87
//       "index": 8,
88
//       "name": "ref_miss",
89
//       "docs": "\tNumber of times we have not found an existing connec[...]
90
//     }
91
//   }
92
// }
93
94
95
struct VSC_vcp*
96
VSC_vcp_New(struct vsmw_cluster *vc,
97
    struct vsc_seg **sg, const char *fmt, ...)
98 1026
{
99 1026
        va_list ap;
100 1026
        struct VSC_vcp *retval;
101
102 1026
        va_start(ap, fmt);
103 1026
        retval = VRT_VSC_Allocv(vc, sg, vsc_vcp_name, VSC_vcp_size,
104 1026
            vsc_vcp_json, sizeof vsc_vcp_json, fmt, ap);
105 1026
        va_end(ap);
106 1026
        return(retval);
107 1026
}
108
109
void
110
VSC_vcp_Destroy(struct vsc_seg **sg)
111 0
{
112 0
        struct vsc_seg *p;
113
114 0
        AN(sg);
115 0
        p = *sg;
116
        *sg = NULL;
117 0
        VRT_VSC_Destroy(vsc_vcp_name, p);
118 0
}