summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/source/misc/traceevent.cxx10
-rw-r--r--include/comphelper/profilezone.hxx26
2 files changed, 6 insertions, 30 deletions
diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx
index cd6d3929e27c..793fea6cdb0e 100644
--- a/comphelper/source/misc/traceevent.cxx
+++ b/comphelper/source/misc/traceevent.cxx
@@ -118,16 +118,6 @@ void ProfileZone::addRecording()
+ OUString::number(osl_getThreadIdentifier(nullptr)) + "},");
}
-void ProfileZone::stopConsole()
-{
- TimeValue systemTime;
- osl_getSystemTime(&systemTime);
- long long nEndTime
- = static_cast<long long>(systemTime.Seconds) * 1000000 + systemTime.Nanosec / 1000;
- std::cerr << "comphelper::ProfileZone: " << m_sName << " finished in "
- << (nEndTime - m_nCreateTime) / 1000 << " ms" << std::endl;
-}
-
} // namespace comphelper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx
index 08e6a8b031e8..772a1b6f51be 100644
--- a/include/comphelper/profilezone.hxx
+++ b/include/comphelper/profilezone.hxx
@@ -25,18 +25,15 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent
static int s_nNesting; // level of nested zones.
long long m_nCreateTime;
- bool m_bConsole;
- void stopConsole();
int m_nNesting;
void addRecording();
- ProfileZone(const char* sName, const OUString& sArgs, bool bConsole)
+ ProfileZone(const char* sName, const OUString& sArgs)
: NamedEvent(sName, sArgs)
- , m_bConsole(bConsole)
, m_nNesting(-1)
{
- if (s_bRecording || m_bConsole)
+ if (s_bRecording)
{
TimeValue systemTime;
osl_getSystemTime(&systemTime);
@@ -56,22 +53,14 @@ public:
* Note that the char pointer is stored as such in the ProfileZone object and used in the
* destructor, so be sure to pass a pointer that stays valid for the duration of the object's
* lifetime.
- *
- * The second parameter can be used for ad-hoc local measuring by adding a single line of code
- * at a C++ scope start. Example:
- *
- * comphelper::ProfileZone aZone("RtfFilter::filter", true);
- *
- * Similar to the DEBUG macro in sal/log.hxx, don't forget to remove these lines before
- * committing.
*/
- ProfileZone(const char* sName, const std::map<OUString, OUString>& aArgs, bool bConsole = false)
- : ProfileZone(sName, createArgsString(aArgs), bConsole)
+ ProfileZone(const char* sName, const std::map<OUString, OUString>& aArgs)
+ : ProfileZone(sName, createArgsString(aArgs))
{
}
- ProfileZone(const char* sName, bool bConsole = false)
- : ProfileZone(sName, OUString(), bConsole)
+ ProfileZone(const char* sName)
+ : ProfileZone(sName, OUString())
{
}
@@ -90,9 +79,6 @@ public:
if (s_bRecording)
addRecording();
}
-
- if (m_bConsole)
- stopConsole();
}
}