Previous Topic Next topic Print topic


Running Your Application with Profiler

Running your application with Profiler produces profiling reports.
Note: This facility is supported in native COBOL only.

Having enabled Profiler for a project, you need to execute the application with Profiler in order to generate the Profiler data.

If your application does not require an enterprise server, to run it with Profiler and produce a profiling report, you need to create a run configuration that has profiling enabled and then execute your application with it:

  1. Ensure that Profiler is enabled in your project, for a build configuration or for a file.
  2. Optionally, specify Profiler report generation options in Window > Preferences > Micro Focus > COBOL > Profiler.
  3. Right-click your project in COBOL Explorer, and click Run > Run Configurations.
  4. Right-click COBOL Application and then click New to create a new run configuration.
  5. In the right side of the configuration manager, click the Dynamic Analysis tab of the new configuration.
  6. Check Enable profiling.
  7. Specify a Results directory in your project that will hold the results from profiling. The default name for this directory is Profiler.
  8. Click Apply and then click Run.

    If you have not specified any Profiler report generation options in the IDE preferences, the IDE displays a dialog box with the available options.

  9. Check your preferred options and click OK.

    Running your application with Profiler creates one or more files with an .ipf extension in the directory in your project that you specified earlier. If Profiler is not enabled at project level but for only individual programs, this produces separate filename.ipf files for each program that has profiling enabled in the file properties.

If your application requires an enterprise server, to run your application with Profiler you need to configure the server to run with Profiler and then stop the server. The Profiler report is generated after the server stops:

  1. In the IDE, ensure that Profiler is enabled in your project's properties.
  2. Ensure your project is associated with an enterprise server that is configured to run the application.
  3. Ensure that the enterprise server is configured to run with Profiler - right-click the server in Server Explorer and click Configure Analysis > Profiler.
  4. Start the server from Server Explorer.

    This starts a dialog box prompting you to specify a folder in your project to hold the Profiler reports. Specify the folder to use and click OK.

  5. Execute your application in the usual manner.
  6. Right-click the server in Server Explorer and click Stop.

    Running your application with Profiler creates one or more files with an .ipf extension in the directory in your project that you specified earlier. If Profiler is not enabled at project level but for only individual programs, this produces separate filename.ipf files for each program that has profiling enabled in the file properties.

Viewing the Profiler reports

If, in the IDE preferences for Profiler you checked Clean old profiler output and generate new reports upon run completion, running with Profiler also produces a file with the basename of the first file in your project but with an .prf extension in the subfolder of your project that holds the Profiler output. This is the report file and it opens automatically in the editor. If you profile more than one program at the same time, the Profiler output for all programs is appended to the output file for the first program, filename1.ipf.

If Clean old profiler output and generate new reports upon run completion is not checked, the build only produces the .ipf files. In this case, to generate a Profiler report, right-click one or more of the .ipf files in your project, and click Generate Profiler Report.

The IDE also produces a Profiler report when your project has dependencies on other projects that have profiling enabled. In such cases, the Profiler report file is saved in a subfolder of the project that contains the main program specified in the launch configuration.

Previous Topic Next topic Print topic