Skip to main content
Manu Fernandes
Inspiring
Jun 18, 2021 12:56 PM UTC

Universe /Performance Analysis, CPU charge analysis

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
------------------------------

    1 reply

    Mark Baldridge
    Participating Frequently
    Jun 21, 2021 3:20 PM UTC
    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
    ------------------------------
    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
    ------------------------------