Skip to content

Commit c6a01c0

Browse files
fixed issues
1 parent f0a30e5 commit c6a01c0

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

ydb/library/yql/providers/solomon/solomon_accessor/client/solomon_accessor_client.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,53 +17,53 @@ namespace {
1717

1818
Downsampling::GapFilling ParseGapFilling(const TString& fill)
1919
{
20-
if (fill.equal("NULL")) {
20+
if (fill == "NULL"sv) {
2121
return Downsampling::GAP_FILLING_NULL;
2222
}
23-
if (fill.equal("NONE")) {
23+
if (fill == "NONE"sv) {
2424
return Downsampling::GAP_FILLING_NONE;
2525
}
26-
if (fill.equal("PREVIOUS")) {
26+
if (fill == "PREVIOUS"sv) {
2727
return Downsampling::GAP_FILLING_PREVIOUS;
2828
}
2929
return Downsampling::GAP_FILLING_UNSPECIFIED;
3030
}
3131

3232
Downsampling::GridAggregation ParseGridAggregation(const TString& aggregation)
3333
{
34-
if (aggregation.equal("MAX")) {
34+
if (aggregation == "MAX"sv) {
3535
return Downsampling::GRID_AGGREGATION_MAX;
3636
}
37-
if (aggregation.equal("MIN")) {
37+
if (aggregation == "MIN"sv) {
3838
return Downsampling::GRID_AGGREGATION_MIN;
3939
}
40-
if (aggregation.equal("SUM")) {
40+
if (aggregation == "SUM"sv) {
4141
return Downsampling::GRID_AGGREGATION_SUM;
4242
}
43-
if (aggregation.equal("AVG")) {
43+
if (aggregation == "AVG"sv) {
4444
return Downsampling::GRID_AGGREGATION_AVG;
4545
}
46-
if (aggregation.equal("LAST")) {
46+
if (aggregation == "LAST"sv) {
4747
return Downsampling::GRID_AGGREGATION_LAST;
4848
}
49-
if (aggregation.equal("COUNT")) {
49+
if (aggregation == "COUNT"sv) {
5050
return Downsampling::GRID_AGGREGATION_COUNT;
5151
}
5252
return Downsampling::GRID_AGGREGATION_UNSPECIFIED;
5353
}
5454

5555
MetricType ParseMetricType(const TString& type)
5656
{
57-
if (type.equal("DGAUGE")) {
57+
if (type == "DGAUGE"sv) {
5858
return MetricType::DGAUGE;
5959
}
60-
if (type.equal("IGAUGE")) {
60+
if (type == "IGAUGE"sv) {
6161
return MetricType::IGAUGE;
6262
}
63-
if (type.equal("COUNTER")) {
63+
if (type == "COUNTER"sv) {
6464
return MetricType::COUNTER;
6565
}
66-
if (type.equal("RATE")) {
66+
if (type == "RATE"sv) {
6767
return MetricType::RATE;
6868
}
6969
return MetricType::METRIC_TYPE_UNSPECIFIED;
@@ -100,7 +100,7 @@ class TSolomonAccessorClient : public ISolomonAccessorClient, public std::enable
100100
if (auto self = weakSelf.lock()) {
101101
resultPromise.SetValue(self->ProcessHttpResponse(std::move(result)));
102102
} else {
103-
resultPromise.SetValue(TListMetricsResult("Client is being shutted down"));
103+
resultPromise.SetValue(TListMetricsResult("Client has been shut down"));
104104
}
105105
};
106106

@@ -142,7 +142,7 @@ class TSolomonAccessorClient : public ISolomonAccessorClient, public std::enable
142142
if (auto self = weakSelf.lock()) {
143143
resultPromise.SetValue(self->ProcessGrpcResponse(std::move(status), std::move(result)));
144144
} else {
145-
resultPromise.SetValue(TGetDataResult("Client is being shutted down"));
145+
resultPromise.SetValue(TGetDataResult("Client has been shut down"));
146146
}
147147
};
148148

0 commit comments

Comments
 (0)