diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-10-23 12:31:58 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-10-23 13:02:28 +0300 |
commit | 2593d96b8d03fd1d4f17b05882a09687c47471c5 (patch) | |
tree | 8f4867a3dacbd4c72904906fcb754d052d1b4772 /configmgr | |
parent | d45607c4be485952158c58b1ebb83f7632f1a057 (diff) |
Log parsing time of each xcd file
Change-Id: I290e2c84b17b9b5063139c6027b72f6cd3a78a99
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/parsemanager.cxx | 5 | ||||
-rw-r--r-- | configmgr/source/parsemanager.hxx | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/configmgr/source/parsemanager.cxx b/configmgr/source/parsemanager.cxx index fcbb190672be..008f2bf69ddf 100644 --- a/configmgr/source/parsemanager.cxx +++ b/configmgr/source/parsemanager.cxx @@ -35,7 +35,7 @@ namespace configmgr { ParseManager::ParseManager( OUString const & url, rtl::Reference< Parser > const & parser) - : reader_(url), parser_(parser), itemNamespaceId_(-1) + : url_(url), reader_(url), parser_(parser), itemNamespaceId_(-1) { assert(parser.is()); int id; @@ -56,6 +56,7 @@ ParseManager::ParseManager( } bool ParseManager::parse(std::set< OUString > const * existingDependencies) { + sal_uInt32 startTime( osl_getGlobalTimer() ); for (;;) { switch (itemData_.is() ? xmlreader::XmlReader::RESULT_BEGIN @@ -66,6 +67,7 @@ bool ParseManager::parse(std::set< OUString > const * existingDependencies) { if (!parser_->startElement( reader_, itemNamespaceId_, itemData_, existingDependencies)) { + SAL_INFO("configmgr", "parsing " << url_ << " took " << (osl_getGlobalTimer() - startTime) << " ms, fail"); return false; } break; @@ -76,6 +78,7 @@ bool ParseManager::parse(std::set< OUString > const * existingDependencies) { parser_->characters(itemData_); break; case xmlreader::XmlReader::RESULT_DONE: + SAL_INFO("configmgr", "parsing " << url_ << " took " << (osl_getGlobalTimer() - startTime) << " ms, success"); return true; } itemData_.clear(); diff --git a/configmgr/source/parsemanager.hxx b/configmgr/source/parsemanager.hxx index 85ed3c5ca4f3..74fa131b1caf 100644 --- a/configmgr/source/parsemanager.hxx +++ b/configmgr/source/parsemanager.hxx @@ -47,6 +47,7 @@ public: enum { NAMESPACE_OOR = 1, NAMESPACE_XS = 2, NAMESPACE_XSI = 3 }; private: + OUString url_; virtual ~ParseManager(); xmlreader::XmlReader reader_; |