Search My Blog

Wednesday, October 7, 2015

STD Foundation Classes - Application Performance Profiling!

** New Feature **

STD Integrated Framework

Application Performance Profiling!

    With the release of the new STD Integrated Framework for PowerBuilder and Appeon (version 2015.4.0.43 and higher), the framework was enhanced to deliver a new feature - Dynamic Application Profiling. The the Application Profiling feature has been available to native PB applications for many, many releases - but, only when running the application from the PB IDE or when a developer remembered to code the TraceXxxx () commands in their application. The framework's Dynamic Profiling feature though can be activated by the application user, developer, QA or Support specialist at anytime by selecting the keyboard CTRL+SHIFT+F2 keys in succession. The feature is also self contained and ready to use at a moments notice with no programming required by the developer what so ever!
 
    The Profiling feature can be activated by either: a) launching the frameworks DEBUG/SPY feature ( CTRL+SHIFT+F1 ) or b) using the direct short-cut ( CTRL+SHIFT+F2 ). In the case of the Debug/Spy, the application user will now notice a new command button located on the lower right-hand side named "Profiling...". When pressed, this command button will open the new Profiling dialogue: 
Example of starting Application Profiling from the DEBUG/SPY dialogue!
    The Profiling dialogue built into the Integrated framework contains all the options to fully engage all of the PowerBuilder Application Profiler options normally available from the IDE. Once activated, all the application user needs to do is: a) select what aspects of the application they would like traced; b) provide a name for the trace [which will appear on the various reports] and c) select/set a trace file name. Once these items are completed, Application Profiling can be started by selecting the "Profile ON" command button, as follows:
  
Example of the Integrated Framework's built-in Profiling dialogue in action!
    Once the Application Profiling has been requested, the Application Profiler dialogue will close but the framework will remember all the specific settings that were selected  prior to activation. Both these settings and the trace file itself will default to the application .EXE's current folder (unless a specific path has been supplied in the Trace File Name area - for example:  c:\temp\orderentry.pbp). The profiling session and thus trace will be automatically finalized and closed when the business application is exited or the application user can finalize the Profile Trace at any time by again pressing ( CTRL+SHIFT+F2 ) or launching the Application Profiler from the DEBUG/SPY feature. When presented to the application user with a trace in-progress, the dialogue will present the lower left-hand command button with the option "Profile OFF". Pressing this command button will immediately finalize the Profiling session and make the .PBP (PowerBuilder Profile) file available for processing - however, the application user may continue to run the business application further and even start more dynamic application profiling session in another part of the application!
  
Example of finalizing the Application Profile at any point in the application!

   When the Application Performance Profile file has been created & populated, the file can now be sent to the application developer. The PowerBuilder developer will then launch the PB IDE and run the Profile Reporting Tools by selecting File=>New from the IDE's main menu. In the corresponding dialogue the developer can now choose one of three Profile Viewing options:  Class, Routine or Trace, as follows:
 
Example of selecting an Application Profiling viewer!

    Once a reporting view is selected, the next step will be to: a) point the  viewer to the .PBP trace file and b) point the PB IDE to the application target used to manage the application source code for your application;s project, as follows:

    From this point onward, the PowerBuilder developer may now drill down through the various viewer options to "zero in" on the problem performance area of the application. The three viewers will contain a plethora of information about the application's execution. Here are some examples of the viewer reports that you may generate:
  



   Hopefully, this detailed performance trace information will allow the PB developer to pinpoint latent code and then optimize the application code for maximum performance and minimum user processing delay. The nice thing about building your PB Applications from the STD Integrated Framework is that the Application Profiling feature is always a keyboard stroke away - even in Production. Like the old American Express credit card commercials that said "don't leave home without it" ... the Application Profiling feature has a similar statement  ... "don't deploy without it" and "look ma, no hands (ahhh ... coding )!

Enjoy!
Regards ... Chris

No comments:

Post a Comment