summaryrefslogtreecommitdiffstats
path: root/toolkit/components/glean/tests/pytest/metrics_test_output_cpp
blob: 5b9c7bfae477ba57df27f55aed8d6ab7cc373cda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
// -*- mode: C++ -*-

// AUTOGENERATED BY glean_parser.  DO NOT EDIT.

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef mozilla_Metrics_h
#define mozilla_Metrics_h

#include "mozilla/glean/bindings/MetricTypes.h"
#include "mozilla/Maybe.h"
#include "nsTArray.h"
#include "nsPrintfCString.h"

#include <tuple>

namespace mozilla::glean {
struct NoExtraKeys;
enum class DynamicLabel: uint16_t { };

namespace test {
  /**
   * generated from test.boolean_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::BooleanMetric boolean_metric(1);

  /**
   * generated from test.counter_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::CounterMetric counter_metric(2);

  /**
   * generated from test.custom_distribution_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::CustomDistributionMetric custom_distribution_metric(3);

  /**
   * generated from test.labeled_boolean_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::Labeled<impl::BooleanMetric, DynamicLabel> labeled_boolean_metric(4);

  /**
   * generated from test.labeled_boolean_metric_labels
   */
  enum class LabeledBooleanMetricLabelsLabel: uint16_t {
      eOneLabel = 0,
      eTwoLabels = 1,
      eThreeLabels = 2,
      eFourLabels = 3,
      eFiveLabels = 4,
      eSixLabels = 5,
      eSevenLabels = 6,
      eEightLabels = 7,
      eNineLabels = 8,
      eTenLabels = 9,
      e__Other__,
    };
  /**
   * A multi-line
     * description
   */
  constexpr impl::Labeled<impl::BooleanMetric, LabeledBooleanMetricLabelsLabel> labeled_boolean_metric_labels(5);

  /**
   * generated from test.labeled_counter_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::Labeled<impl::CounterMetric, DynamicLabel> labeled_counter_metric(6);

  /**
   * generated from test.labeled_counter_metric_labels
   */
  enum class LabeledCounterMetricLabelsLabel: uint16_t {
      eOneLabel = 0,
      eTwoLabels = 1,
      e__Other__,
    };
  /**
   * A multi-line
     * description
   */
  constexpr impl::Labeled<impl::CounterMetric, LabeledCounterMetricLabelsLabel> labeled_counter_metric_labels(7);

  /**
   * generated from test.labeled_string_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::Labeled<impl::StringMetric, DynamicLabel> labeled_string_metric(8);

  /**
   * generated from test.labeled_string_metric_labels
   */
  enum class LabeledStringMetricLabelsLabel: uint16_t {
      eOneLabel = 0,
      eTwoLabels = 1,
      e__Other__,
    };
  /**
   * A multi-line
     * description
   */
  constexpr impl::Labeled<impl::StringMetric, LabeledStringMetricLabelsLabel> labeled_string_metric_labels(9);

  /**
   * generated from test.memory_distribution_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::MemoryDistributionMetric memory_distribution_metric(10);

  /**
   * generated from test.string_list_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::StringListMetric string_list_metric(11);

  /**
   * generated from test.string_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::StringMetric string_metric(12);

  /**
   * generated from test.text_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::TextMetric text_metric(13);

  /**
   * generated from test.timespan_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::TimespanMetric timespan_metric(14);

  /**
   * generated from test.timing_distribution_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::TimingDistributionMetric timing_distribution_metric(15);

}
namespace test_nested {
  /**
   * generated from test.nested.datetime_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::DatetimeMetric datetime_metric(16);

  /**
   * generated from test.nested.event_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::EventMetric<NoExtraKeys> event_metric(17);

  /**
   * generated from test.nested.event_metric_with_extra
   */
    struct EventMetricWithExtraExtra {
      mozilla::Maybe<nsCString> anExtraKey;
      mozilla::Maybe<nsCString> anotherExtraKey;

      std::tuple<nsTArray<nsCString>, nsTArray<nsCString>> ToFfiExtra() const {
        nsTArray<nsCString> extraKeys;
        nsTArray<nsCString> extraValues;
        if (anExtraKey) {
          extraKeys.AppendElement()->AssignASCII("an_extra_key");
          extraValues.EmplaceBack(anExtraKey.value());
        }
        if (anotherExtraKey) {
          extraKeys.AppendElement()->AssignASCII("another_extra_key");
          extraValues.EmplaceBack(anotherExtraKey.value());
        }
        return std::make_tuple(std::move(extraKeys), std::move(extraValues));
      }
    };
  /**
   * A multi-line
     * description
   */
  constexpr impl::EventMetric<EventMetricWithExtraExtra> event_metric_with_extra(18);

  /**
   * generated from test.nested.external_denominator
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::DenominatorMetric external_denominator(19);

  /**
   * generated from test.nested.optimizable_counter_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::CounterMetric optimizable_counter_metric(20);

  /**
   * generated from test.nested.quantity_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::QuantityMetric quantity_metric(21);

  /**
   * generated from test.nested.rate_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::RateMetric rate_metric(22);

  /**
   * generated from test.nested.rate_with_external_denominator
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::NumeratorMetric rate_with_external_denominator(23);

  /**
   * generated from test.nested.uuid_metric
   */
  /**
   * A multi-line
     * description
   */
  constexpr impl::UuidMetric uuid_metric(24);

}

} // namespace mozilla::glean

#endif // mozilla_Metrics_h