Error Problem with SessionTrace

Cringer

ProgressTalk.com Moderator
Staff member
I've created a Profile output (11.2.1, win7) and am trying to load it up in SessionTrace (TraceMain.w) and am getting errors.

** Invalid date input. (85)

** Invalid character in numeric input c. (76)

Etc.

I also get really horrible errors loading it in Profiler Control Tool. Which leads me to think I'm doing something wrong to get my Profile file. It's attached. Here's also the code I use to enable/disable the profiler.

Code:
 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.
 

Attachments

  • 69714profile.txt
    47.3 KB · Views: 5

Cringer

ProgressTalk.com Moderator
Staff member
Session Trace still fails.
But Profile Control Tool works a treat (after I edit the file location fill in to allow more than 60 characters!)
 

Cringer

ProgressTalk.com Moderator
Staff member
Thanks Rob. Profiler Control Tool looks shocking, but it is enough as a demo for my talk in November.
 

Cringer

ProgressTalk.com Moderator
Staff member
Pretty sure it's the latest version. Looks like I created the folder some time in July. So unless I downloaded from the wrong place, or they've changed it since it must be the latest.
 

TheMadDBA

Active Member
I guess I should clarify a bit... SessionTrace only loads files in its format.. meaning user tablestats/indexstats/profile data by snapshots... and not generic profiler files.

I will add in some extra checks to make sure the files to be loaded are in its special format.
 

Cringer

ProgressTalk.com Moderator
Staff member
Ahhh my misunderstanding. Sorry about that. /slopes off feeling rather stupid ;)


I'll have to give the profile control tool a poke with a stick then to add some features, as well as bigger screen support. The ability to export browse contents to excel would be very nice for demos.
 

TheMadDBA

Active Member
No worries... I do think that most of the information you really need cases is covered with the SessionTrace. If there are features that you would like to see from the profiler that aren't in the session trace let me know. The first pass left off the call tree display (working on a good way for that now).

Personally I think combining the timings with the VST info gives you the best of both worlds, especially since things can run well enough in development but still read way too many records for production use.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
I like SessionTrace. I downloaded it last week and tried it out with a GUI client, using "Run program". Works great.

I see that it created a "customrun.trc" in the working directory. I haven't yet figured out exporting to flat file or HTML, or using it with a batch client.

Can you provide a simple "hello world" example of programmatically integrating SessionTrace.cls into a batch client to produce a trace file that could be viewed after the fact with your GUI tool?

Also, under "Code Timing", my values for "Time in ms" were quite low (low double digits) compared to what I was expecting. Is that milliseconds or seconds?
 

TheMadDBA

Active Member
Still fighting over control over the domain name from my horrible hosting provider... ugh. I think a new domain is in order until that gets resolved....

Looks like some of the timing displays are messed up in the HTML/GUI side (new versions should correct this I hope).
You can grab it again from http://themaddba.s3-website-us-west-2.amazonaws.com/dlmain.html

Some sample code from the website....

Code:
/*--- Use the profiler to gather detailed line timings ---*/
 SessionTrace:UseProfiler = TRUE.

/*--- Start the tracing session ---*/
 SessionTrace:StartTracing().

/*--- Read the state table ---*/
  FOR EACH state NO-LOCK:
  END.

/*--- Make a snapshot to track this section separately ---*/
 SessionTrace:StartSnapshot("Order and order-line section").

/*--- Read more data in a bad way ---*/
FOR EACH order WHERE order.cust-num <> 1000 NO-LOCK,
  EACH order-line OF order NO-LOCK,
  EACH ITEM OF order-line NO-LOCK
  BREAK BY ITEM.item-name DESCENDING:
END.

/*--- Stop the tracing ---*/
 SessionTrace:StopTracing().

/*--- Write the data out in HTML format ---*/
 SessionTrace:WriteHTML("MySession.html").

/*--- Write the data out in text format for the GUI tool to load ---*/
 SessionTrace:WriteText("MySession.txt").
 

TheMadDBA

Active Member
lol no worries... first pass stuff is always a little lacking or at least mine is ;-)

I need to find the time to thoroughly debug it all (and spell check) and make PDF/HTML documentation and example code. About to try and install V9 to see how much of it breaks on that.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Thanks, got the new version working. And created the flat file and HTML. When all else fails, read the instructions... :D

One small issue: under "Code Timing", "Time (ms)" seems to be calculated as seconds / 1000; it should be seconds * 1000.

A nice-to-have for the future: if one could click column headers to change the sort order of the GUI browses/HTML tables.
 

TheMadDBA

Active Member
Hmmm... let me double check the GUI and the HTML output again.

I had worked a little on the window resizing and plan to implement sorting and moving/resizing the browses (and maybe multiple windows). Sorting in the HTML itself might be interesting and require downloading or integrating some javascript. I will see what I can do.

Thanks for giving it a test drive
 

TheMadDBA

Active Member
I hope so... I have been asking for that for a number of years. It would really be nice to have a supported tool that integrates the Profiler, VSTs and client logging.

Rob... I can't seem to duplicate that issue with the current code. Did you restart your session to reload the static class? (one big downside of static classes).
 
Top