Grasshopper

algorithmic modeling for Rhino

1. Is there a native profiler in the python component? 

2. If there is, any examples on how to use it? 

Views: 819

Replies to This Discussion

which is a profiler?

Hi Marshall

you could use the Grasshopper standard profiler widget. Does that work?

Thanks,

- Giulio
_______________
giulio@mcneel.com

It works well enough for the whole component but I have several classes and functions running inside the component, I was going to use it to test which parts were the slowest.   

Ah I see, then I would suggest to use either Python's time module (time.clock() should have higher accuracy), in a way similar to this:

import time
start = time.clock()
#... repeat the operation several times
total_ms = time.clock() - start

Otherwise, you could use .Net's standard profiling services, such as Stopwatch.

I hope this helps,

- Giulio
________________
giulio@mcneel.com

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service