The Duration column in the legend provides the wall clock time from the moment the sampling starts to the moment it is stopped. This includes any pauses when samples are not collected. If an Activity is started with the Start with data collection paused option (or -start-paused option in the command-line interface) enabled, samples are not collected until the resume instruction is given through either a ResumeAPI() or by clicking the Pause/Resume button to resume sampling.
You can specify the Duration for an Activity in the Configure Sampling Activity dialog box.
By default, the duration is 0 seconds. This setting runs the Activity infinitely. When using the default duration, you need to explicitly stop the Activity. If you enable calibration for event-based sampling, you need to set the duration to another value.
The Duration of an Activity is affected by the following factors:
Time taken to start and stop the sampling collector during data collection. The sampling collector must enumerate all of the modules loaded into memory before collecting data.
Time spent on data collection, as displayed in the Output window, is always a little more than the one displayed in the column Duration in the legend. The additional time is used for creating the .tb5 file.
The time reported as duration is not for the time samples are collected but for the time between when the sampling driver started and stopped. The driver is running even during a pause mode when samples are not collected. If an Activity is started with the Start with data collection paused option enabled, samples are not collected until the resume instruction is given through Resume Activity action of the ActivityController.
Delay sampling time is included in the Duration.
Executing applications that utilize a high percentage of the processor can add a significant amount of time to the specified Duration.
You cannot specify zero (0) as the Duration if you enable calibration (-cal option in the command line interface) for event-based sampling.
Unusual system activity, such as intense keyboard input or extremely high processor operation, can cause the Activity to finish later than its specified Duration.
The size of the output file the VTune analyzer creates is limited only by the amount of free disk space available in your system and the length of sampling time. Ensure that your drive has free space equal to 2.5 times the anticipated size of the samples collected in order to allow the VTune analyzer to generate the raw data and have enough room to generate a database of analyzed data when the collection results are opened. Note that your workload may also use up disk space during the collection.
Right-click Activity in the Tuning Browser and select Modify Activity.
Select Modify the selected Activity and click OK.
The Configure
Sampling Activity dialog box appears.
Enter the Duration for the Activity.
use -d | -duration <#>.
Command-line example:
>vtl activity -d 15 -c sampling run
This example creates and runs an Activity with the sampling collector for 15 seconds.
If you specify an application to launch, but not the Duration, sampling continues indefinitely until you terminate the application. If you do not specify an application to launch or no events are selected, the default duration is 20 seconds.