Question Profiler

whwar9739

Member
Ok, so I have searched the forum, the internet and found little to nothing to answer my question. I am trying to get a profiler output from a program but I am getting nothing. I am using progress 11.2 on an AIX environment. I added code similar to the following in my program I want to profile.
Before code to be analyzed:
Code:
  ASSIGN
      PROFILER:FILE-NAME    = “profile.out"
      PROFILER:COVERAGE    = Yes
      PROFILER:DESCRIPTION  = "profile ” + STRING(NOW)
      PROFILER:DIRECTORY    = "/usr/dbnobkup/"
      PROFILER:ENABLED      = Yes
      PROFILER:LISTINGS    = YES
      PROFILER:PROFILING    = Yes
      PROFILER:TRACING      = ""
      PROFILER:TRACE-FILTER = ""
  .

After code to be analyzed:
Code:
  ASSIGN
      PROFILER:ENABLED      = No
      PROFILER:PROFILING    = No
  .

And I get no output to analyze. Are there any db settings that need to be turned on to use the profiler?
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
I have found that in some cases the order in which you specify the profiler properties is significant, and can in some cases prevent you from getting any output, although I can't remember the exact circumstances. Try moving the location of ENABLED and PROFILING. Sorry I can't be more specific. Also, your client has to exit cleanly to get output, though you can use the profiler:write-data() method to flush the data to disk before you exit.

There is nothing to be done on the DB side.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Also, Tom has a good presentation on the subject here. And a good one from Dan Foreman, here.

Also, if you haven't already, look at the readme that's included with the profiler; it's pretty informative.
 

Cringer

ProgressTalk.com Moderator
Staff member
Code:
ON "CTRL-ALT-F12":U ANYWHERE
DO:
  PROFILER:ENABLED = NOT PROFILER:ENABLED.
  PROFILER:PROFILING = PROFILER:ENABLED.
  PROFILER:LISTINGS = TRUE. 
  IF PROFILER:ENABLED THEN 
    lv-ProfileFile = SESSION:TEMP-DIRECTORY + STRING(TIME) + "profile.out".
  MESSAGE "Profiler is" STRING(PROFILER:ENABLED,"ON/OFF") 
    SKIP "File Name:" lv-ProfileFile
    VIEW-AS ALERT-BOX.
  PROFILER:FILE-NAME = lv-ProfileFile.
END.

That works for me.
 

whwar9739

Member
Thanks Rob that did the trick. Just moved enabled and profiling to the top of the assign.
Cringer - thanks for the comment I will keep that in mind for any gui programs I might need to do.
 
Top