Code Coverage: vinyl-cache/vmod/VSC_debug.c
 
82217aa4fc7094b3610340078afaf78cd95a8ec9
 
0
/*
1
 * NB:  This file is machine generated, DO NOT EDIT!
2
 *
3
 * Edit debug.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_debug.h"
13
14
static const char vsc_debug_name[] = "DEBUG";
15
16
#define PARANOIA(a,n)                           \
17
    v_static_assert(                            \
18
        offsetof(struct VSC_debug, a) == n,     \
19
        "VSC element '" #a "' at wrong offset")
20
21
PARANOIA(count, 0);
22
#undef PARANOIA
23
24
static const unsigned char vsc_debug_json[307] = {
25
        123,34,118,101,114,115,105,111,110,34,58,34,49,34,44,34,110,97,109,101,
26
        34,58,34,100,101,98,117,103,34,44,34,111,110,101,108,105,110,101,114,
27
        34,58,34,69,120,97,109,112,108,101,32,67,111,117,110,116,101,114,115,
28
        34,44,34,111,114,100,101,114,34,58,55,48,44,34,100,111,99,115,34,58,
29
        34,92,116,84,101,115,116,32,99,111,117,110,116,101,114,115,32,102,114,
30
        111,109,32,118,109,111,100,95,100,101,98,117,103,34,44,34,101,108,101,
31
        109,101,110,116,115,34,58,49,44,34,101,108,101,109,34,58,123,34,99,111,
32
        117,110,116,34,58,123,34,116,121,112,101,34,58,34,99,111,117,110,116,
33
        101,114,34,44,34,99,116,121,112,101,34,58,34,117,105,110,116,54,52,95,
34
        116,34,44,34,108,101,118,101,108,34,58,34,100,101,98,117,103,34,44,34,
35
        111,110,101,108,105,110,101,114,34,58,34,97,114,98,105,116,114,97,114,
36
        121,32,99,111,117,110,116,101,114,34,44,34,102,111,114,109,97,116,34,
37
        58,34,105,110,116,101,103,101,114,34,44,34,105,110,100,101,120,34,58,
38
        48,44,34,110,97,109,101,34,58,34,99,111,117,110,116,34,44,34,100,111,
39
        99,115,34,58,34,92,116,74,117,115,116,32,99,111,117,110,116,105,110,
40
        103,32,115,111,109,101,116,104,105,110,103,34,125,125,125,0
41
};
42
43
// {
44
//   "version": "1",
45
//   "name": "debug",
46
//   "oneliner": "Example Counters",
47
//   "order": 70,
48
//   "docs": "\tTest counters from vmod_debug",
49
//   "elements": 1,
50
//   "elem": {
51
//     "count": {
52
//       "type": "counter",
53
//       "ctype": "uint64_t",
54
//       "level": "debug",
55
//       "oneliner": "arbitrary counter",
56
//       "format": "integer",
57
//       "index": 0,
58
//       "name": "count",
59
//       "docs": "\tJust counting something"
60
//     }
61
//   }
62
// }
63
64
65
struct VSC_debug*
66
VSC_debug_New(struct vsmw_cluster *vc,
67
    struct vsc_seg **sg, const char *fmt, ...)
68 1
{
69 1
        va_list ap;
70 1
        struct VSC_debug *retval;
71
72 1
        va_start(ap, fmt);
73 1
        retval = VRT_VSC_Allocv(vc, sg, vsc_debug_name, VSC_debug_size,
74 1
            vsc_debug_json, sizeof vsc_debug_json, fmt, ap);
75 1
        va_end(ap);
76 1
        return(retval);
77 1
}
78
79
void
80
VSC_debug_Destroy(struct vsc_seg **sg)
81 1
{
82 1
        struct vsc_seg *p;
83
84 1
        AN(sg);
85 1
        p = *sg;
86
        *sg = NULL;
87 1
        VRT_VSC_Destroy(vsc_debug_name, p);
88 1
}