@@ -17,53 +17,53 @@ namespace {
17
17
18
18
Downsampling::GapFilling ParseGapFilling (const TString& fill)
19
19
{
20
- if (fill. equal ( " NULL" ) ) {
20
+ if (fill == " NULL" sv ) {
21
21
return Downsampling::GAP_FILLING_NULL;
22
22
}
23
- if (fill. equal ( " NONE" ) ) {
23
+ if (fill == " NONE" sv ) {
24
24
return Downsampling::GAP_FILLING_NONE;
25
25
}
26
- if (fill. equal ( " PREVIOUS" ) ) {
26
+ if (fill == " PREVIOUS" sv ) {
27
27
return Downsampling::GAP_FILLING_PREVIOUS;
28
28
}
29
29
return Downsampling::GAP_FILLING_UNSPECIFIED;
30
30
}
31
31
32
32
Downsampling::GridAggregation ParseGridAggregation (const TString& aggregation)
33
33
{
34
- if (aggregation. equal ( " MAX" ) ) {
34
+ if (aggregation == " MAX" sv ) {
35
35
return Downsampling::GRID_AGGREGATION_MAX;
36
36
}
37
- if (aggregation. equal ( " MIN" ) ) {
37
+ if (aggregation == " MIN" sv ) {
38
38
return Downsampling::GRID_AGGREGATION_MIN;
39
39
}
40
- if (aggregation. equal ( " SUM" ) ) {
40
+ if (aggregation == " SUM" sv ) {
41
41
return Downsampling::GRID_AGGREGATION_SUM;
42
42
}
43
- if (aggregation. equal ( " AVG" ) ) {
43
+ if (aggregation == " AVG" sv ) {
44
44
return Downsampling::GRID_AGGREGATION_AVG;
45
45
}
46
- if (aggregation. equal ( " LAST" ) ) {
46
+ if (aggregation == " LAST" sv ) {
47
47
return Downsampling::GRID_AGGREGATION_LAST;
48
48
}
49
- if (aggregation. equal ( " COUNT" ) ) {
49
+ if (aggregation == " COUNT" sv ) {
50
50
return Downsampling::GRID_AGGREGATION_COUNT;
51
51
}
52
52
return Downsampling::GRID_AGGREGATION_UNSPECIFIED;
53
53
}
54
54
55
55
MetricType ParseMetricType (const TString& type)
56
56
{
57
- if (type. equal ( " DGAUGE" ) ) {
57
+ if (type == " DGAUGE" sv ) {
58
58
return MetricType::DGAUGE;
59
59
}
60
- if (type. equal ( " IGAUGE" ) ) {
60
+ if (type == " IGAUGE" sv ) {
61
61
return MetricType::IGAUGE;
62
62
}
63
- if (type. equal ( " COUNTER" ) ) {
63
+ if (type == " COUNTER" sv ) {
64
64
return MetricType::COUNTER;
65
65
}
66
- if (type. equal ( " RATE" ) ) {
66
+ if (type == " RATE" sv ) {
67
67
return MetricType::RATE;
68
68
}
69
69
return MetricType::METRIC_TYPE_UNSPECIFIED;
@@ -100,7 +100,7 @@ class TSolomonAccessorClient : public ISolomonAccessorClient, public std::enable
100
100
if (auto self = weakSelf.lock ()) {
101
101
resultPromise.SetValue (self->ProcessHttpResponse (std::move (result)));
102
102
} else {
103
- resultPromise.SetValue (TListMetricsResult (" Client is being shutted down" ));
103
+ resultPromise.SetValue (TListMetricsResult (" Client has been shut down" ));
104
104
}
105
105
};
106
106
@@ -142,7 +142,7 @@ class TSolomonAccessorClient : public ISolomonAccessorClient, public std::enable
142
142
if (auto self = weakSelf.lock ()) {
143
143
resultPromise.SetValue (self->ProcessGrpcResponse (std::move (status), std::move (result)));
144
144
} else {
145
- resultPromise.SetValue (TGetDataResult (" Client is being shutted down" ));
145
+ resultPromise.SetValue (TGetDataResult (" Client has been shut down" ));
146
146
}
147
147
};
148
148
0 commit comments