(cobra metrics to statsd bot) send info about memory warnings
This commit is contained in:
parent
aae2402ed2
commit
78713895dd
@ -1,6 +1,10 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
All changes to this project will be documented in this file.
|
All changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [9.8.0] - 2020-06-19
|
||||||
|
|
||||||
|
(cobra metrics to statsd bot) send info about memory warnings
|
||||||
|
|
||||||
## [9.7.9] - 2020-06-18
|
## [9.7.9] - 2020-06-18
|
||||||
|
|
||||||
(http client) fix deadlock when following redirects
|
(http client) fix deadlock when following redirects
|
||||||
|
@ -33,6 +33,24 @@ namespace
|
|||||||
|
|
||||||
namespace ix
|
namespace ix
|
||||||
{
|
{
|
||||||
|
bool processMemoryWarningsMetricsEvent(const Json::Value& msg,
|
||||||
|
StatsdClient& statsdClient)
|
||||||
|
{
|
||||||
|
auto startTime = msg["device"]["start_time"].asUInt64();
|
||||||
|
auto timestamp = msg["timestamp"].asUInt64();
|
||||||
|
auto game = msg["device"]["game"].asString();
|
||||||
|
|
||||||
|
std::stringstream ss;
|
||||||
|
ss << msg["id"].asString() << "."
|
||||||
|
<< game;
|
||||||
|
|
||||||
|
std::string id = ss.str();
|
||||||
|
|
||||||
|
statsdClient.timing(id, (timestamp - startTime) / 1000);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool processNetRequestMetricsEvent(const Json::Value& msg,
|
bool processNetRequestMetricsEvent(const Json::Value& msg,
|
||||||
StatsdClient& statsdClient)
|
StatsdClient& statsdClient)
|
||||||
{
|
{
|
||||||
@ -216,6 +234,10 @@ namespace ix
|
|||||||
{
|
{
|
||||||
success = processNetRequestMetricsEvent(msg, statsdClient);
|
success = processNetRequestMetricsEvent(msg, statsdClient);
|
||||||
}
|
}
|
||||||
|
else if (msg["id"].asString() == "engine_memory_warning_id")
|
||||||
|
{
|
||||||
|
success = processMemoryWarningsMetricsEvent(msg, statsdClient);
|
||||||
|
}
|
||||||
|
|
||||||
if (success) sentCount++;
|
if (success) sentCount++;
|
||||||
});
|
});
|
||||||
|
@ -6,4 +6,4 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define IX_WEBSOCKET_VERSION "9.7.9"
|
#define IX_WEBSOCKET_VERSION "9.8.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user