Developer Guide

  • 2021.1
  • 11/03/2021
  • Public
Contents

Create a Histogram

You can run the measurement analysis sample to create a histogram based on data collected from a real-time application. The real-time application must be instrumented with measurement library APIs.
In this mode, the analysis sample runs the instrumented application and waits until it is finished. Then it loads the collected data from the dump file that the instrumented application created. Finally, the analysis sample runs the analysis and shows the histogram. This type of analysis is called “offline” analysis.
The analysis sample creates a histogram for the specified measurement instance from the instrumented application. A
measurement instance
refers to the measurement library APIs that you have added to your application to measure the latency of the real-time cycle or any part of it. For more information about instrumenting your code with measurement library APIs, see Instrument the Code.
The following example histograms are based on data collected from the multiple measurements sample (
tcc_multiple_measurements_sample
).
To run this example:
  1. From your host system, connect to the target system:
    ssh <user>@<target>
  2. In the SSH session
    , run the sample:
    tcc_measurement_analysis_sample hist "Multiplication:1000" -time-units us -- tcc_multiple_measurements_sample --approximation 10000 --multiplication 100 --iterations 1000
where:
Argument
Description
Multiplication:1000
This argument specifies the measurement instance to collect:
  • “Multiplication” is the measurement name defined in the
    __itt_string_handle_create
    call in the
    tcc_multiple_measurements_sample
    .
  • “1000” is the maximum number of measurements that can be stored for this measurement instance.
This argument has the same format as the
TCC_MEASUREMENTS_BUFFERS
environment variable. See Control Data Collection.
-time-units us
The output will display results in microseconds.
--
Separates the measurement analysis sample command from the real-time application command. For more information about the command-line options of
tcc_multiple_measurements_sample
, see Command-Line Options.
Example Output
The sample prints the output of the profiled application and the profiling results.
The profiling output includes the following:
  • Histogram name based on the name of the measurement instance (“Multiplication” histogram)
  • The table representing:
    • Latency Ranges: Ranges of recorded execution times. The number of ranges is dynamic and depends logarithmically on the number of measurements.
    • Count: Number of iterations that fall into each latency range
    • Histogram: Visual representation of the corresponding count
  • Total counts: Total number of iterations shown in the histogram
  • Average execution time of the iterations
  • Deviation from the average
APPLICATION OUTPUT: Running with arguments: approximation = 10000, multiplication = 100, iterations = 1000 Running workloads. This may take a while, depending on iteration values. ------------------------------ PROFILING OUTPUT: ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- "Multiplication" histogram Latency Ranges [us] Count Histogram (3073, 3093) 779 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| (3093, 3113) 157 ||||||||||||||||| (3113, 3133) 25 || (3133, 3153) 11 | (3153, 3173) 4 | (3173, 3193) 4 | (3193, 3213) 2 | (3213, 3233) 2 | (3233, 3253) 3 | (3253, 3273) 0 (3273, 3293) 2 | (3293, 3313) 1 | (3313, 3333) 1 | (3333, 3353) 2 | (3353, 3373) 1 | (3373, 3393) 1 | (3393, 3413) 0 (3413, 3433) 1 | (3433, 3453) 0 (3453, 3473) 0 (3473, 3493) 0 (3493, 3513) 0 (3513, 3533) 1 | (3533, 3553) 0 (3553, 3573) 0 (3573, 3593) 0 (3593, 3613) 0 (3613, 3633) 0 (3633, 3653) 0 (3653, 3673) 0 (3673, 3693) 0 (3693, 3713) 0 (3713, 3733) 3 | Total counts: 1000 Avg. Value: 16 Std. Deviation: 1

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.