diff options
author | Tor Lillqvist <tml@collabora.com> | 2021-04-27 16:42:15 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2021-04-28 16:48:00 +0200 |
commit | 9e5b04d1e8c49d5f95173b5074368b1aa24a1e64 (patch) | |
tree | df72f97fe9e7c64f790a98800aeaa104268c7e23 /comphelper | |
parent | 92c37610fa6e9fdeebee33a8baf0faf0bb731101 (diff) |
Introduce a new class NamedEvent to be used by the upcoming AsyncEvent, too
Don't use the term "profile id" as what we mean is the event *name*
(as used in the Chrome Trace Event format).
Change-Id: Id58a10f4c5f8a095ae75b9bf74131b70659ee701
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114755
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/traceevent.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx index efe1378d9364..9febf71e2db7 100644 --- a/comphelper/source/misc/traceevent.cxx +++ b/comphelper/source/misc/traceevent.cxx @@ -42,7 +42,7 @@ void TraceEvent::addRecording(const OUString& sObject) g_aRecording.emplace_back(sObject); } -void TraceEvent::addInstantEvent(const char* sProfileId) +void TraceEvent::addInstantEvent(const char* sName) { TimeValue aSystemTime; osl_getSystemTime(&aSystemTime); @@ -57,7 +57,7 @@ void TraceEvent::addInstantEvent(const char* sProfileId) addRecording("{" "\"name:\"" - + OUString(sProfileId, strlen(sProfileId), RTL_TEXTENCODING_UTF8) + + OUString(sName, strlen(sName), RTL_TEXTENCODING_UTF8) + "\"," "\"ph\":\"i\"," "\"ts\":" @@ -106,7 +106,7 @@ void ProfileZone::addRecording() // Generate a single "Complete Event" (type X) TraceEvent::addRecording("{" "\"name\":\"" - + OUString(m_sProfileId, strlen(m_sProfileId), RTL_TEXTENCODING_UTF8) + + OUString(m_sName, strlen(m_sName), RTL_TEXTENCODING_UTF8) + "\"," "\"ph\":\"X\"," "\"ts\":" @@ -125,7 +125,7 @@ void ProfileZone::addRecording() void ProfileZone::stopConsole() { sal_uInt32 nEndTime = osl_getGlobalTimer(); - std::cerr << "comphelper::ProfileZone: " << m_sProfileId << " finished in " + std::cerr << "comphelper::ProfileZone: " << m_sName << " finished in " << nEndTime - m_nCreateTime << " ms" << std::endl; } |