From 8c830ccf4e07e23c3423fb5e1ae0dde296a17d27 Mon Sep 17 00:00:00 2001 From: "r.kuznetsov" Date: Wed, 6 Jan 2016 11:47:05 +0300 Subject: [PATCH] Added sending statistics about GPU --- drape/support_manager.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drape/support_manager.cpp b/drape/support_manager.cpp index 3aad71859a..9a2e46973d 100644 --- a/drape/support_manager.cpp +++ b/drape/support_manager.cpp @@ -3,6 +3,8 @@ #include "base/logging.hpp" +#include "3party/Alohalytics/src/alohalytics.h" + namespace dp { @@ -12,6 +14,15 @@ void SupportManager::Init() string const version = GLFunctions::glGetString(gl_const::GLVersion); LOG(LINFO, ("Renderer =", renderer, "Version =", version)); + // On Android the engine may be recreated. Here we guarantee that GPU info is sent once. + static bool gpuInfoSent = false; + if (!gpuInfoSent) + { + alohalytics::TStringMap details {{ "renderer", renderer }}; + alohalytics::Stats::Instance().LogEvent("GPU", details); + gpuInfoSent = true; + } + m_isSamsungGoogleNexus = (renderer == "PowerVR SGX 540" && version.find("GOOGLENEXUS.ED945322") != string::npos); if (m_isSamsungGoogleNexus) LOG(LINFO, ("Samsung Google Nexus detected."));