Grasshopper

algorithmic modeling for Rhino

Script perforformance measurement line by line - line_profiler

Goodmorning all,

i've found this useful tool that helps mearusing the performance of a script, returning memory usage and time of calculation.

The problem is that even if I insert the module in the reference files folder of IronPython, it doesn't appear when i try to use

import line_profiler

Is there any know issue with installing this module in python?

Or, maybe is there another way to measure the performance of a script in grasshopper python?

Really thanks in advance

Views: 418

Replies to This Discussion

You don't necessarily need a 3rd party profiler, you can start out by using System.Diagnostics.Stopwatch to accurately measure time intervals. The stopwatch class has better timekeeping than using DateTime.UtcNow and is to be preferred. You start a new stopwatch (StopWatch.StartNew() static method) before some code, and then call stopWatch.Elapsed after the code. If you want to profile part of a loop, you'll need to start, pause, continue, pause, .... the same stopwatch.

Really helpful!
Thank you David! I'll try to post some results to be through.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service