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
gregson06Does anyone know if this script works? I tried it a couple of times and I get gibberish..
March 13, 2007, 11:24 PM
susannahiway has a gibberish adapter ... coming out in the next version
March 14, 2007, 04:43 AM
Tony ATry the function that I posted
here