Profiling Natural Applications

This document provides general information on profiling Natural applications.


Introducing Profiling

A profiler is a tool for dynamic program analysis. It measures the frequency and duration of instructions to simplify program optimization.

The Natural Profiler is used to profile Natural applications. It collects profiling data whenever a defined Natural event occurs, for example, when a program starts or before a database is called. The Natural Profiler visualizes the recorded event data as an event trace and the calling structure of the executed Natural objects as a program trace. The performance evaluation provided by the Natural Profiler shows the time consumption and hit count of the executed objects, Natural statements and program lines.

You can view Natural Profiler event data in the Profiler utility output or export the data in text or table format. You can visualize Natural Profiler performance analyses in NaturalONE (Software AG’s Eclipse-based development environment) or with the Natural Profiler Rich GUI (a Natural for Ajax application).

A Natural Profiler analysis serves as the basis for performance optimization of a Natural application. The Natural Profiler provides you with a very fast overview about the time-consuming parts of a Natural application. No code modification is required, and moreover, just basic knowledge of the application is sufficient.

Platform-Specific Profiling

You can profile Natural applications on UNIX, Windows and mainframe platforms. How to profile a Natural application depends on the platform and the application processing mode used:

Mainframes

  • Mainframe interactive applications are profiled with the NaturalONE Profiler or the Profiler utility in online mode.

  • Mainframe interactive applications executed remotely from Natural Studio or RPC are profiled with the Profiler utility in batch mode.

  • Mainframe batch applications are profiled with the Profiler utility in batch mode.

UNIX and Windows

  • UNIX and Windows interactive applications are profiled with the NaturalONE Profiler or the Natural Profiler for UNIX and Windows, respectively.

  • UNIX and Windows batch applications are profiled with the Natural Profiler for UNIX and Windows, respectively.

Profiling Tools

This section summarizes the key features of the Natural profiling tools:

Features of the NaturalONE Profiler

  • Profiles interactive Natural applications from UNIX, Windows or mainframe platforms in an Eclipse-based development environment.

  • Reads and analyzes Profiler resource files containing event data collected by the mainframe Profiler utility in batch mode or by the Natural Profiler for UNIX and Windows.

  • Provides features for big data handling:

    • Event filter,

    • Sampling technique,

    • Data consolidation.

  • Performance analyses of programs, statements and program lines:

    • CPU time,

    • Elapsed time,

    • Hit count.

  • Displays an event trace.

  • Provides direct navigation from a profiled program line to the corresponding source code.

  • Saves and reloads the Profiler data as an XML-formatted file.

Features of the Natural Profiler for UNIX and Windows

  • Profiles interactive or Natural batch applications from UNIX or Windows platforms.

  • Provides features for big data handling:

    • Event filter,

    • Sampling technique,

    • Data consolidation.

  • Saves the Profiler data as a Profiler resource file.

Features of the Profiler Utility

Online Mode (Mainframes)
  • Profiles interactive Natural applications from mainframe platforms.

  • Provides an event filter.

  • Displays an event trace.

  • Saves the Profiler data in a table format.

  • Saves the Profiler data as a Profiler resource file.

Note:
The amount of data collected by the Profiler utility in online mode is restricted by the relatively small size of the Natural Data Collector buffer which works in a wrap-around mode. Moreover, when running under CICS or Com-plete, the CPU time is not provided. In general, we recommend that you use the NaturalONE Profiler for profiling interactive Natural mainframe applications because the NaturalONE Profiler has no size restrictions and supports CPU performance analyses.

Batch Mode (Mainframes)
  • Profiles Natural batch and Natural RPC applications from mainframe platforms.

  • Profiles mainframe interactive applications executed remotely from Natural Studio.

  • Provides features for big data handling:

    • Event, program, count and time filters,

    • Sampling technique,

    • Data consolidation.

  • Saves Profiler data as a Profiler resource file.

  • Reads and analyzes Profiler resource files.

  • Prints program and event traces.

  • Analyzes program performance.

  • Evaluates transaction response times.

  • Collects and displays Profiler properties and statistics.

  • Provides a function to delete a Natural Profiler resource file.

Batch Mode (UNIX and Windows)
  • Reads and analyzes Profiler resource files.

  • Provides features for big data handling:

    • Data consolidation.

  • Saves consolidated Profiler data as a Profiler resource file.

  • Prints program and event traces.

  • Analyses program performance.

  • Displays Profiler properties and statistics.

Features of the Natural Profiler Rich GUI

  • Lists the Profiler resources of a given library.

  • Displays Profiler properties and statistics.

  • Provides a function to consolidate Profiler data.

  • Provides a function to delete a Natural Profiler resource file.

  • Visualizes Profiler data on a graphical, interactive browser interface.

  • Analyzes application performance with selection criteria such as library, program, program line or user for various KPIs:

    • CPU time,

    • Elapsed time,

    • Adabas command time,

    • Hit counts like database calls or runtime errors.

  • Combines the program source with the Profiler data for program analysis.

Natural Profiler Evaluations

The evaluation criteria provided by the Natural profiling tools are summarized in the following table:

Evaluation Profiling Tool Description
Program Summary Profiler utility (batch) Shows the CPU time spent for each Natural object that executed and the Natural events that occurred in an object.

See also Example of a Program Summary.

Line Summary Profiler utility (batch) Shows the CPU and elapsed time spent during Natural program execution for each individual source line and the number of Natural events that occurred in the line.

See also Example of a Line Summary.

Transaction Summary Profiler utility (batch) Shows the response time spent for each individual transaction and the number of Natural events that occurred during transaction execution.

For more information, see Transaction Summary.

See also Example of a Transaction Summary.

Hot Spots NaturalONE Profiler Shows the CPU and elapsed time used by Natural objects, statements and program lines and how often an object or statement executed.

From a profiled program line you can directly navigate to the corresponding source code line.

See also the appropriate description of hot spots in Using the Natural Profiler in the NaturalONE documentation.

Data Evaluation Natural Profiler Rich GUI Visualizes the Profiler data on an interactive rich GUI interface. You can evaluate the distribution of the CPU and elapsed time, the Adabas command time or various hit counts and select criteria for the distribution.

See also the example of a data evaluation in the Natural Profiler Rich GUI section.

Program Analysis Natural Profiler Rich GUI Combines the source of monitored programs with the Profiler data whereby the source is colored according to the value of the selected KPI.

See also the example of a program analysis in the Natural Profiler Rich GUI section.

Program Trace Profiler utility (batch) Shows the program flow of the profiled application in the call hierarchy and the number of events that occurred.

See also Example of a Program Trace.

Event Trace

NaturalONE Profiler,
Profiler utility

Lists the recorded event data in chronological order.

See also Example of an Event Trace, Example of List Trace Records, and the appropriate description in Using the Natural Profiler in the NaturalONE documentation.

Profiler Properties,
Profiler Statistics

Natural Profiler Rich GUI,
Profiler utility (batch)

Lists Profiler properties such as the Profiler revision, and statistics of the monitored application that show, for example, the total CPU and elapsed time.

See also the example with properties and statistics in the Natural Profiler Rich GUI section, and Profiler Statistics (batch).