Home AMX User Forum NetLinx Studio

Profiling processor activity

When I'm working on a reasonably large project with multiple Netlinx and Duet modules I find it really hard to figure out what parts of the program are overloading the processor - be it particular event handlers, functions, java code or time spent shuffling commands/strings back and forth between devices.

Diagnostic and notification information is a start but it is positively medieval next to profiling tools for PC software that will tell you how many milliseconds have been spent in each function etc.

Do any similar tools exist for AMX? Or are there ways I can get access to scheduling information that will allow me to pinpoint processor hogs?

Cheers

Comments

  • PhreaKPhreaK Posts: 966
    Aside from writing your own basic profiling tools that compare time delta you may find the spy tool of use. If you telnet into an NI execute 'spy' to being and 'spy stop' to stop. It exposes spyLIB and can be useful particularly if you're writing duet modules than spawn multiple threads.

    Also, if you are just wanting to quickly visualise how you system resources respond to different events this may be of use.
  • tomktomk Posts: 24
    Mate. Maaaaaate.

    ...

    Mate.

    Absolutely brilliant. Both of those things are wonderful and I fully intend to pick apart your java to see how you're doing this. Thanks.
  • PhreaKPhreaK Posts: 966
    No problems.
    tomk wrote: »
    I fully intend to pick apart your java to see how you're doing this.
    It just sets up a telnet connection to the master and parses the result of 'cpu usage' and 'show mem' at regular intervals then feeds that into LiveGraph. Stupidly simple and nasty. There's plenty of nicer ways to do it but this approach means you don't need any client side code.
  • I run something similar but as a Duet mdoule on the NI. Supports connecting as Telnet loop back or through a serial port wired to the programming port. Companion RMS Monitor module to report back status to the server.
Sign In or Register to comment.