[vtkusers] how to quantify executing time

David E DeMarle dave.demarle at kitware.com
Thu Feb 4 10:51:57 EST 2016

Hi Chiang,

Take a look at vtkTimerLog.h. Basically call StartLog, do something with
VTK, and DumpLog. That will record the times taken within vtk to do various
things like rendering and data processing.

One key point to be aware of is containment, which is represented in the
log by indentations. If you have some function A which calls B, A's time
will include the time taken by B. The logs will look something like this:
A 5 seconds
  B 4 seconds
which means that A spent only 1 second beyond what B did.

A call to render will include calls to update filters whenever they are out
of date, so Render will contain Filter.


David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Thu, Feb 4, 2016 at 6:40 AM, WangQ <wangq1979 at outlook.com> wrote:

> Hello vtkusers,
> I wonder if there is any way to measure the executing time from very
> beginning till rendering finish in VTK? Seems conventional tic toc
> inapplicable to VTK.
> It would be great if can separate computation time, e.g. time for
> processing data, and rendering time.
> Cheers,
> Chiang
> _______________________________________________
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160204/498d40a5/attachment.html>

More information about the vtkusers mailing list