For Time-based sampling, the Sampling interval represents the amount of time the VTuneTM Performance Analyzer waits before collecting each sample. The Sampling interval is the frequency of data collection.
For Event-based sampling, the Sampling interval is used to calculate the target number of samples and the Sample After value during the calibration run. To calculate the average number of samples collected per event, use the formula: Duration (sec) * 1000ms/1sec * 1/(Sampling interval (ms) /sample).
Example:
If Duration = 10 seconds and Sampling interval = 1 millisecond, the number of samples collected is calculated as follows:
10(sec) * 1000ms /1(sec) * 1 / 1ms / 1 sample) = 10000 samples
This number of samples collected per second is multiplied by Duration to get the target number of samples that will be collected for an event in an Activity run. The Sample After value is calculated based off the target number of samples for an event.
To determine an appropriate Sampling interval, consider the Duration of the collection, the speed of your processors, and the amount of software activity. For instance, if the Duration of sampling time is more than 10 minutes, consider increasing the Sampling interval to 50 milliseconds. This reduces the number of interrupts and the number of samples collected and written to disk. The smaller the Sampling interval, the larger the number of samples collected and written to disk.
use -si | -sampling-interval <interval in milliseconds>.
Example for the Linux* operating system:
>vtl activity -c sampling -o "-ec en='clockticks' -si 4" run
This example creates and runs an Activity with the sampling collector for 20 seconds using a sampling interval of 4ms. The sampling collector uses the event-based sampling (default) and collects samples for the clockticks event. The calibration run will calculate the Sample After value for the event using a 4ms sampling interval. During the sampling run the sampling collector will use the calculated Sample After value. After the clockticks event occurs, a Sample After value number of times a sample will be taken. See the Calibration topic for more information
Example for the Microsoft* Windows* operating system:
>vtl activity -d 15 -c sampling -o "-sm tbs -ec en='clockticks' -si 2" run
This example creates and runs an Activity with the sampling collector for 15 seconds. The sampling collector uses the time-based sampling mechanism and collects samples every 2 milliseconds.
Time-based sampling currently is not supported on Linux.