[ITK] [ITK-users] Measure execution time of all filters in a mini-pipeline
Hammond, Emily M
emily-hammond at uiowa.edu
Fri Jun 6 12:07:24 EDT 2014
Hello,
Here is a basic example of how itk::TimeProbesCollectorBase works.
#include "itkTimeProbesCollectorBase.h"
// instantiate a time
itk::TimeProbesCollectorBase timer;
// start timer
timer.Start("NameOfProcess#1");
filterPipeline#1
filter->Update();
timer.Stop("NameOfProcess#1");
timer.Start("NameOfProcess#1");
filterPipeline#2
filter->Update();
timer.Stop("NameOfProcess#2");
// continue until all desired processes are timed
// print out summary report to the terminal
timer.Report( std::cout );
Looks something like this:
Probe Tag Starts Stops Time (s)
Complete Code 1 1 80.5431
Post-processing 1 1 65.6743
Rigid Registration 1 1 8.35478
Enjoy!
Emily Hammond
________________________________________
From: Insight-users [insight-users-bounces at itk.org] on behalf of Cyril Mory [cyril.mory at creatis.insa-lyon.fr]
Sent: Friday, June 06, 2014 9:38 AM
To: Insight Users
Subject: [ITK-users] Measure execution time of all filters in a mini-pipeline
Hi ITK users,
I have large "mini-pipeline" filters (some use 20 or more subfilters,
some of which are minipipelines themselves) and I need to measure how
long each of the subfilters takes to execute.
Is there an easy way I can do that in ITK ?
In an old thread, several solutions were mentioned:
http://www.itk.org/pipermail/insight-developers/2005-December/007447.html
but the thread doesn't say which solution was adopted.
As far as I have understood at the moment, the solution would involve
the use of itk::TimeProbesCollectorBase, but I have found no example of
how to use it. If that is indeed the way to go, can someone direct me to
an example I could start from ?
Best regards,
--
--
Cyril Mory, Post-doc
CREATIS
Leon Berard cancer treatment center
28 rue Laënnec
69373 Lyon cedex 08 FRANCE
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php
Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ
Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users
More information about the Community
mailing list