@@ -12,6 +12,11 @@ public static void Inc(this IGauge gauge, double increment, DateTimeOffset times
1212 gauge . Inc ( increment , timestamp . ToUnixTimeMilliseconds ( ) ) ;
1313 }
1414
15+ public static void IncTo ( this IGauge gauge , double value , DateTimeOffset timestamp )
16+ {
17+ gauge . IncTo ( value , timestamp . ToUnixTimeMilliseconds ( ) ) ;
18+ }
19+
1520 public static void Inc ( this IMetricFamily < IGauge > metricFamily , double increment = 1 )
1621 {
1722 metricFamily . Unlabelled . Inc ( increment ) ;
@@ -27,21 +32,61 @@ public static void Inc(this IMetricFamily<IGauge> metricFamily, double increment
2732 metricFamily . Unlabelled . Inc ( increment , timestamp . ToUnixTimeMilliseconds ( ) ) ;
2833 }
2934
35+ public static void IncTo ( this IMetricFamily < IGauge > metricFamily , double value )
36+ {
37+ metricFamily . Unlabelled . IncTo ( value ) ;
38+ }
39+
40+ public static void IncTo ( this IMetricFamily < IGauge > metricFamily , double value , long timestamp )
41+ {
42+ metricFamily . Unlabelled . IncTo ( value , timestamp ) ;
43+ }
44+
45+ public static void IncTo ( this IMetricFamily < IGauge > metricFamily , double value , DateTimeOffset timestamp )
46+ {
47+ metricFamily . Unlabelled . IncTo ( value , timestamp . ToUnixTimeMilliseconds ( ) ) ;
48+ }
49+
3050 public static void Dec ( this IGauge gauge , double decrement , DateTimeOffset timestamp )
3151 {
3252 gauge . Dec ( decrement , timestamp . ToUnixTimeMilliseconds ( ) ) ;
3353 }
3454
55+ public static void DecTo ( this IGauge gauge , double value , DateTimeOffset timestamp )
56+ {
57+ gauge . DecTo ( value , timestamp . ToUnixTimeMilliseconds ( ) ) ;
58+ }
59+
3560 public static void Dec ( this IMetricFamily < IGauge > metricFamily , double decrement = 1 )
3661 {
3762 metricFamily . Unlabelled . Dec ( decrement ) ;
3863 }
3964
65+ public static void Dec ( this IMetricFamily < IGauge > metricFamily , double decrement , long timestamp )
66+ {
67+ metricFamily . Unlabelled . Dec ( decrement , timestamp ) ;
68+ }
69+
4070 public static void Dec ( this IMetricFamily < IGauge > metricFamily , double decrement , DateTimeOffset timestamp )
4171 {
4272 metricFamily . Unlabelled . Dec ( decrement , timestamp ) ;
4373 }
4474
75+ public static void DecTo ( this IMetricFamily < IGauge > metricFamily , double value )
76+ {
77+ metricFamily . Unlabelled . DecTo ( value ) ;
78+ }
79+
80+ public static void DecTo ( this IMetricFamily < IGauge > metricFamily , double value , long timestamp )
81+ {
82+ metricFamily . Unlabelled . DecTo ( value , timestamp ) ;
83+ }
84+
85+ public static void DecTo ( this IMetricFamily < IGauge > metricFamily , double value , DateTimeOffset timestamp )
86+ {
87+ metricFamily . Unlabelled . DecTo ( value , timestamp ) ;
88+ }
89+
4590 public static void Set ( this IGauge gauge , double val , DateTimeOffset timestamp )
4691 {
4792 gauge . Set ( val , timestamp . ToUnixTimeMilliseconds ( ) ) ;
@@ -92,6 +137,36 @@ public static void Inc<TLabels>(this IMetricFamily<IGauge, TLabels> metricFamily
92137 metricFamily . Unlabelled . Inc ( increment , timestamp ) ;
93138 }
94139
140+ public static void IncTo < TLabels > ( this IMetricFamily < IGauge , TLabels > metricFamily , double value )
141+ #if HasITuple
142+ where TLabels : struct , ITuple , IEquatable < TLabels>
143+ #else
144+ where TLabels : struct , IEquatable < TLabels>
145+ #endif
146+ {
147+ metricFamily . Unlabelled . IncTo ( value ) ;
148+ }
149+
150+ public static void IncTo < TLabels > ( this IMetricFamily < IGauge , TLabels > metricFamily , double value , long timestamp )
151+ #if HasITuple
152+ where TLabels : struct , ITuple , IEquatable < TLabels>
153+ #else
154+ where TLabels : struct , IEquatable < TLabels>
155+ #endif
156+ {
157+ metricFamily . Unlabelled . IncTo ( value , timestamp ) ;
158+ }
159+
160+ public static void IncTo < TLabels > ( this IMetricFamily < IGauge , TLabels > metricFamily , double value , DateTimeOffset timestamp )
161+ #if HasITuple
162+ where TLabels : struct , ITuple , IEquatable < TLabels>
163+ #else
164+ where TLabels : struct , IEquatable < TLabels>
165+ #endif
166+ {
167+ metricFamily . Unlabelled . IncTo ( value , timestamp ) ;
168+ }
169+
95170 public static void Dec < TLabels > ( this IMetricFamily < IGauge , TLabels > metricFamily , double decrement = 1 )
96171#if HasITuple
97172 where TLabels : struct , ITuple , IEquatable < TLabels>
@@ -102,6 +177,16 @@ public static void Dec<TLabels>(this IMetricFamily<IGauge, TLabels> metricFamily
102177 metricFamily . Unlabelled . Dec ( decrement ) ;
103178 }
104179
180+ public static void Dec < TLabels > ( this IMetricFamily < IGauge , TLabels > metricFamily , double decrement , long timestamp )
181+ #if HasITuple
182+ where TLabels : struct , ITuple , IEquatable < TLabels>
183+ #else
184+ where TLabels : struct , IEquatable < TLabels>
185+ #endif
186+ {
187+ metricFamily . Unlabelled . Dec ( decrement , timestamp ) ;
188+ }
189+
105190 public static void Dec < TLabels > ( this IMetricFamily < IGauge , TLabels > metricFamily , double decrement , DateTimeOffset timestamp )
106191#if HasITuple
107192 where TLabels : struct , ITuple , IEquatable < TLabels>
@@ -112,6 +197,36 @@ public static void Dec<TLabels>(this IMetricFamily<IGauge, TLabels> metricFamily
112197 metricFamily . Unlabelled . Dec ( decrement , timestamp ) ;
113198 }
114199
200+ public static void DecTo < TLabels > ( this IMetricFamily < IGauge , TLabels > metricFamily , double value )
201+ #if HasITuple
202+ where TLabels : struct , ITuple , IEquatable < TLabels>
203+ #else
204+ where TLabels : struct , IEquatable < TLabels>
205+ #endif
206+ {
207+ metricFamily . Unlabelled . DecTo ( value ) ;
208+ }
209+
210+ public static void DecTo < TLabels > ( this IMetricFamily < IGauge , TLabels > metricFamily , double value , long timestamp )
211+ #if HasITuple
212+ where TLabels : struct , ITuple , IEquatable < TLabels>
213+ #else
214+ where TLabels : struct , IEquatable < TLabels>
215+ #endif
216+ {
217+ metricFamily . Unlabelled . DecTo ( value , timestamp ) ;
218+ }
219+
220+ public static void DecTo < TLabels > ( this IMetricFamily < IGauge , TLabels > metricFamily , double value , DateTimeOffset timestamp )
221+ #if HasITuple
222+ where TLabels : struct , ITuple , IEquatable < TLabels>
223+ #else
224+ where TLabels : struct , IEquatable < TLabels>
225+ #endif
226+ {
227+ metricFamily . Unlabelled . DecTo ( value , timestamp ) ;
228+ }
229+
115230 public static void Set < TLabels > ( this IMetricFamily < IGauge , TLabels > metricFamily , double value )
116231#if HasITuple
117232 where TLabels : struct , ITuple , IEquatable < TLabels>
0 commit comments