Mercurial > hg > orthanc-stone
diff OrthancStone/Sources/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp @ 1751:946eb7200b82
FastParseVector usage + timing instrumentation guarded by STONE_TIME_BLOCKING_OPS
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 22 Feb 2021 14:57:01 +0100 |
parents | 9ac2a65d4172 |
children | 1a775f4ee672 |
line wrap: on
line diff
--- a/OrthancStone/Sources/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp Mon Feb 22 14:56:06 2021 +0100 +++ b/OrthancStone/Sources/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp Mon Feb 22 14:57:01 2021 +0100 @@ -33,6 +33,9 @@ #include <Images/ImageProcessing.h> #include <OrthancException.h> +#if STONE_TIME_BLOCKING_OPS +# include <boost/date_time/posix_time/posix_time.hpp> +#endif namespace OrthancStone { @@ -338,6 +341,10 @@ */ void OrthancSeriesVolumeProgressiveLoader::LoadGeometry(const OrthancRestApiCommand::SuccessMessage& message) { +#if STONE_TIME_BLOCKING_OPS + boost::posix_time::ptime timerStart = boost::posix_time::microsec_clock::universal_time(); +#endif + Json::Value body; message.ParseJsonBody(body); @@ -404,6 +411,14 @@ slicesQuality_.resize(slicesCount, 0); BroadcastMessage(DicomVolumeImage::GeometryReadyMessage(*volume_)); + +#if STONE_TIME_BLOCKING_OPS + boost::posix_time::ptime timerEnd = boost::posix_time::microsec_clock::universal_time(); + boost::posix_time::time_duration duration = timerEnd - timerStart; + int64_t durationMs = duration.total_milliseconds(); + LOG(WARNING) << "OrthancSeriesVolumeProgressiveLoader::LoadGeometry took " << durationMs << " ms"; +#endif + }