Mercurial > hg > orthanc-stone
changeset 1148:5e164c629923 broker
timing
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 15 Nov 2019 10:42:16 +0100 |
parents | bc27c199eefe |
children | 2da8b4d6f8c1 |
files | Framework/Messages/IObservable.cpp Framework/Oracle/GenericOracleRunner.cpp Framework/Viewport/IViewport.h Framework/Viewport/ViewportBase.h |
diffstat | 4 files changed, 14 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/Messages/IObservable.cpp Thu Nov 14 15:53:49 2019 +0100 +++ b/Framework/Messages/IObservable.cpp Fri Nov 15 10:42:16 2019 +0100 @@ -58,8 +58,7 @@ void IObservable::EmitMessageInternal(const IObserver* receiver, const IMessage& message) { - LOG(TRACE) << "IObservable::EmitMessageInternal receiver = " - << std::hex << receiver << std::dec; + //LOG(TRACE) << "IObservable::EmitMessageInternal receiver = " << std::hex << receiver << std::dec; Callables::const_iterator found = callables_.find(message.GetIdentifier()); if (found != callables_.end()) @@ -113,8 +112,7 @@ void IObservable::EmitMessage(boost::weak_ptr<IObserver> observer, const IMessage& message) { - LOG(TRACE) << "IObservable::EmitMessage observer = " - << std::hex << &observer << std::dec; + //LOG(TRACE) << "IObservable::EmitMessage observer = " << std::hex << &observer << std::dec; boost::shared_ptr<IObserver> lock(observer.lock()); if (lock)
--- a/Framework/Oracle/GenericOracleRunner.cpp Thu Nov 14 15:53:49 2019 +0100 +++ b/Framework/Oracle/GenericOracleRunner.cpp Fri Nov 15 10:42:16 2019 +0100 @@ -265,6 +265,8 @@ << (command.IsPixelDataIncluded() ? "with" : "witout") << " pixel data: " << path; + boost::posix_time::ptime start = boost::posix_time::microsec_clock::local_time(); + uint64_t fileSize = Orthanc::SystemToolbox::GetFileSize(path); // Check for 32bit systems @@ -283,9 +285,13 @@ else { #if DCMTK_VERSION_NUMBER >= 362 - // NB : We could stop at (0x3007, 0x0000) instead of - // DCM_PixelData, cf. the Orthanc::DICOM_TAG_* constants - + /** + * NB : We could stop at (0x3007, 0x0000) instead of + * DCM_PixelData as the Stone framework does not use further + * tags (cf. the Orthanc::DICOM_TAG_* constants), but we + * still use "PixelData" as this does not change the runtime + * much, and as it is more explicit. + **/ static const DcmTagKey STOP = DCM_PixelData; //static const DcmTagKey STOP(0x3007, 0x0000); @@ -300,6 +306,9 @@ if (ok) { handler.Handle(new Orthanc::ParsedDicomFile(dicom), command, path, fileSize); + + boost::posix_time::ptime end = boost::posix_time::microsec_clock::local_time(); + LOG(TRACE) << path << ": parsed in " << (end-start).total_milliseconds() << " ms"; } else {