aboutsummaryrefslogtreecommitdiff
path: root/src/common/Metric/Metric.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Metric/Metric.cpp')
-rw-r--r--src/common/Metric/Metric.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/Metric/Metric.cpp b/src/common/Metric/Metric.cpp
index 56e7b8cdf17..3bb42ff8454 100644
--- a/src/common/Metric/Metric.cpp
+++ b/src/common/Metric/Metric.cpp
@@ -122,16 +122,16 @@ bool Metric::ShouldLog(std::string const& category, int64 value) const
return value >= threshold->second;
}
-void Metric::LogEvent(std::string const& category, std::string const& title, std::string const& description)
+void Metric::LogEvent(std::string category, std::string title, std::string description)
{
using namespace std::chrono;
MetricData* data = new MetricData;
- data->Category = category;
+ data->Category = std::move(category);
data->Timestamp = system_clock::now();
data->Type = METRIC_DATA_EVENT;
- data->Title = title;
- data->Text = description;
+ data->Title = std::move(title);
+ data->ValueOrEventText = std::move(description);
_queuedData.Enqueue(data);
}
@@ -160,10 +160,10 @@ void Metric::SendBatch()
switch (data->Type)
{
case METRIC_DATA_VALUE:
- batchedData << "value=" << data->Value;
+ batchedData << "value=" << data->ValueOrEventText;
break;
case METRIC_DATA_EVENT:
- batchedData << "title=\"" << data->Title << "\",text=\"" << data->Text << "\"";
+ batchedData << "title=\"" << data->Title << "\",text=\"" << data->ValueOrEventText << "\"";
break;
}