forked from aws-powertools/powertools-lambda-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMetricUnit.cs
173 lines (144 loc) · 4.4 KB
/
MetricUnit.cs
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
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
using System.Runtime.Serialization;
using System.Text.Json.Serialization;
namespace AWS.Lambda.Powertools.Metrics;
/// <summary>
/// Enum MetricUnit
/// </summary>
#if NET8_0_OR_GREATER
[JsonConverter(typeof(JsonStringEnumConverter<MetricUnit>))]
#else
[JsonConverter(typeof(JsonStringEnumConverter))]
#endif
public enum MetricUnit
{
/// <summary>
/// Metrics unit none
/// </summary>
[EnumMember(Value = "None")] None,
/// <summary>
/// Metrics unit in seconds
/// </summary>
[EnumMember(Value = "Seconds")] Seconds,
/// <summary>
/// Metrics unit in microseconds
/// </summary>
[EnumMember(Value = "Microseconds")] Microseconds,
/// <summary>
/// Metrics unit in milliseconds
/// </summary>
[EnumMember(Value = "Milliseconds")] Milliseconds,
/// <summary>
/// Metrics unit in bytes
/// </summary>
[EnumMember(Value = "Bytes")] Bytes,
/// <summary>
/// Metrics unit in kilobytes
/// </summary>
[EnumMember(Value = "Kilobytes")] Kilobytes,
/// <summary>
/// Metrics unit in megabytes
/// </summary>
[EnumMember(Value = "Megabytes")] Megabytes,
/// <summary>
/// Metrics unit in gigabytes
/// </summary>
[EnumMember(Value = "Gigabytes")] Gigabytes,
/// <summary>
/// Metrics unit in terabytes
/// </summary>
[EnumMember(Value = "Terabytes")] Terabytes,
/// <summary>
/// Metrics unit in bits
/// </summary>
[EnumMember(Value = "Bits")] Bits,
/// <summary>
/// Metrics unit in kilobits
/// </summary>
[EnumMember(Value = "Kilobits")] Kilobits,
/// <summary>
/// Metrics unit in megabits
/// </summary>
[EnumMember(Value = "Megabits")] Megabits,
/// <summary>
/// Metrics unit in gigabits
/// </summary>
[EnumMember(Value = "Gigabits")] Gigabits,
/// <summary>
/// Metrics unit in terabits
/// </summary>
[EnumMember(Value = "Terabits")] Terabits,
/// <summary>
/// Metrics unit in percent
/// </summary>
[EnumMember(Value = "Percent")] Percent,
/// <summary>
/// Metrics unit count
/// </summary>
[EnumMember(Value = "Count")] Count,
/// <summary>
/// Metrics unit in bytes per second
/// </summary>
[EnumMember(Value = "Bytes/Second")] BytesPerSecond,
/// <summary>
/// Metrics unit in kilobytes per second
/// </summary>
[EnumMember(Value = "Kilobytes/Second")]
KilobytesPerSecond,
/// <summary>
/// Metrics unit in megabytes per second
/// </summary>
[EnumMember(Value = "Megabytes/Second")]
MegabytesPerSecond,
/// <summary>
/// Metrics unit in gigabytes per second
/// </summary>
[EnumMember(Value = "Gigabytes/Second")]
GigabytesPerSecond,
/// <summary>
/// Metrics unit in terabytes per second
/// </summary>
[EnumMember(Value = "Terabytes/Second")]
TerabytesPerSecond,
/// <summary>
/// Metrics unit in bits per second
/// </summary>
[EnumMember(Value = "Bits/Second")] BitsPerSecond,
/// <summary>
/// Metrics unit in kilobits per second
/// </summary>
[EnumMember(Value = "Kilobits/Second")]
KilobitsPerSecond,
/// <summary>
/// Metrics unit in megabits per second
/// </summary>
[EnumMember(Value = "Megabits/Second")]
MegabitsPerSecond,
/// <summary>
/// Metrics unit in gigabits per second
/// </summary>
[EnumMember(Value = "Gigabits/Second")]
GigabitsPerSecond,
/// <summary>
/// Metrics unit in terabits per second
/// </summary>
[EnumMember(Value = "Terabits/Second")]
TerabitsPerSecond,
/// <summary>
/// Metrics unit in count per second
/// </summary>
[EnumMember(Value = "Count/Second")] CountPerSecond
}