Debian Codegraph @

debian/rust-vendor/codspeed/instrument-hooks/scripts/stub.c

raw
1 // Stub implementations - instrumentation not supported on Windows
2 #include <stdlib.h>
3
4 #include "core.h"
5
6 struct InstrumentHooks {
7 uint64_t _unused;
8 };
9
10 static struct InstrumentHooks stub_instance = {0};
11
12 InstrumentHooks *instrument_hooks_init(void) { return &stub_instance; }
13
14 void instrument_hooks_deinit(InstrumentHooks *hooks) { (void)hooks; }
15
16 bool instrument_hooks_is_instrumented(InstrumentHooks *hooks) {
17 (void)hooks;
18 return false;
19 }
20
21 uint8_t instrument_hooks_start_benchmark(InstrumentHooks *hooks) {
22 (void)hooks;
23 return 0;
24 }
25
26 uint8_t instrument_hooks_stop_benchmark(InstrumentHooks *hooks) {
27 (void)hooks;
28 return 0;
29 }
30
31 uint8_t instrument_hooks_set_executed_benchmark(InstrumentHooks *hooks,
32 int32_t pid, const char *uri) {
33 (void)hooks;
34 (void)pid;
35 (void)uri;
36 return 0;
37 }
38
39 // Deprecated: use instrument_hooks_set_executed_benchmark instead
40 uint8_t instrument_hooks_executed_benchmark(InstrumentHooks *hooks, int32_t pid,
41 const char *uri) {
42 (void)hooks;
43 (void)pid;
44 (void)uri;
45 return 0;
46 }
47
48 uint8_t instrument_hooks_set_integration(InstrumentHooks *hooks,
49 const char *name,
50 const char *version) {
51 (void)hooks;
52 (void)name;
53 (void)version;
54 return 0;
55 }
56
57 void instrument_hooks_set_feature(uint64_t feature, bool enabled) {
58 (void)feature;
59 (void)enabled;
60 }
61
62 uint64_t instrument_hooks_current_timestamp(void) { return 0; }
63
64 uint8_t instrument_hooks_add_marker(InstrumentHooks *hooks, int32_t pid,
65 uint8_t marker_type, uint64_t timestamp) {
66 (void)hooks;
67 (void)pid;
68 (void)marker_type;
69 (void)timestamp;
70 return 0;
71 }
72
73 uint8_t instrument_hooks_set_environment(InstrumentHooks *hooks,
74 const char *section_name,
75 const char *key, const char *value) {
76 (void)hooks;
77 (void)section_name;
78 (void)key;
79 (void)value;
80 return 0;
81 }
82
83 uint8_t instrument_hooks_set_environment_list(InstrumentHooks *hooks,
84 const char *section_name,
85 const char *key,
86 const char *const *values,
87 uint32_t count) {
88 (void)hooks;
89 (void)section_name;
90 (void)key;
91 (void)values;
92 (void)count;
93 return 0;
94 }
95
96 uint8_t instrument_hooks_write_environment(InstrumentHooks *hooks,
97 int32_t pid) {
98 (void)hooks;
99 (void)pid;
100 return 0;
101 }