Focal Point
CPU time

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/1821067331

August 01, 2003, 02:38 PM
<FOC Hero>
CPU time
I'm trying to get the CPU time on the remote server running MS SQL Server. &FOCCPU does not give me the same thing is "CPU" time in the EDA Console. The question is how do I query what the Web Console is showing because &FOCCPU ain't it (even if I capture &FOCCPU using -REMOTE BEGIN).
September 23, 2003, 03:04 PM
<monte2000>
&FOCCPU is not yet supported under WEBFOCUS. In WEBFOCUS it is agent driven, and when the agent ends, it is too late to capture the time. Currently there is NEW Feature Request submitted to capture CPU time in WEBFOCUS.
September 24, 2003, 06:15 PM
<Pietro De Santis>
OK, you can't get the real CPU time.

How about tracking the elapsed time?

Put this at the beginning of your request:

-*-- Set Report Start Date and Time -------------
-*-- Used to calculate Elapsed Time -------------
-SET &D_ST_DATE = &YYMD;
-SET &D_ST_TIME = EDIT(HHMMSS('A8'),'99$99$99');
-*-----------------------------------------------

Put this at the end of your request:

-*-- Set Report End Date and Time ---------------
-*-- Used to calculate Elapsed Time -------------
-SET &D_EN_DATE = &YYMD;
-SET &D_EN_TIME = EDIT(HHMMSS('A8'),'99$99$99');
-*-----------------------------------------------

-*-- Calculate Report Elapsed Time --------------
-SET &ST_HH = EDIT(&D_ST_TIME,'99$$$$');
-SET &ST_MM = EDIT(&D_ST_TIME,'$$99$$');
-SET &ST_SS = EDIT(&D_ST_TIME,'$$$$99');

-SET &EN_HH = EDIT(&D_EN_TIME,'99$$$$');
-SET &EN_MM = EDIT(&D_EN_TIME,'$$99$$');
-SET &EN_SS = EDIT(&D_EN_TIME,'$$$$99');

-SET &EN_HH =
- IF &D_EN_DATE GT &D_ST_DATE THEN &EN_HH + 24 ELSE &EN_HH;

-SET &ST_TIME_S = (&ST_HH * 60 *60) + (&ST_MM * 60) + &ST_SS;
-SET &EN_TIME_S = (&EN_HH * 60 *60) + (&EN_MM * 60) + &EN_SS;

-SET &ELAPSED_S = &EN_TIME_S - &ST_TIME_S;
-SET &ELAPSED_M = &ELAPSED_S / 60;
-SET &ELAPSED_R = FMOD(&ELAPSED_S, 60, 'F2');

-TYPE Elapsed time: &ELAPSED_M mins, &ELAPSED_R secs
March 13, 2007, 05:35 PM
gregson06
Does anyone know if this script works? I tried it a couple of times and I get gibberish..
March 13, 2007, 11:24 PM
susannah
iway has a gibberish adapter ... coming out in the next version




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
March 14, 2007, 04:43 AM
Tony A
Try the function that I posted here



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10