Rocket U2 | UniVerse & UniData

 View Only
  • 1.  Universe /Performance Analysis, CPU charge analysis

    PARTNER
    Posted 06-18-2021 12:56
    Hello

    I'll check performance and CPU charge of program.

    Usually I use this
    $OOTIONS TIME.MILLISECONDS
    T=SYSTEM(12)
    DO...
    PRINT SYSTEM(12)-T

    Its about e execution time but I'll identify the CPU charge... To use efficient instructions because the program run for large qty if users. 

    May I use SYSTEM(9) instead system 12?

    Thanks for any suggestions.

    ------------------------------
    Manu Fernandes
    ------------------------------


  • 2.  RE: Universe /Performance Analysis, CPU charge analysis

    Posted 06-21-2021 15:35
    SYSTEM(9) returns the millisecond CPU count charged to your process. This is the value you want. SYSTEM(12) only returns the current wall-clock (elapsed) time.

    The Hitchhiker's Guide to the UniVerse, Part 1, describes how to use this for your purposes. The Hitchhiker's Guide to the UniVerse describes a performance unit test application that I wrote to measure the cost of BASIC statements and how varying data might affect performance.

    ------------------------------
    Mark Baldridge
    Principal Consultant
    Thought Mirror, LLC
    ------------------------------