Juan,
I noticed that if there are no values for a given type you would indeed
get these erroneous results. but I didn't see this behavior once there
were values.
The attached patch defines the average/standard deviation to be zero when
no calls are used.
Does this solve your problem?
Charles
Index: sipp.2007-03-14/stat.cpp
===================================================================
--- sipp.2007-03-14.orig/stat.cpp
+++ sipp.2007-03-14/stat.cpp
@@ -682,6 +682,9 @@ unsigned long CStat::GetStat (E_CounterN
double CStat::computeStdev(E_CounterName P_SumCounter,
E_CounterName P_NbOfCallUsed,
E_CounterName P_Squares) {
+ if (M_counters[P_NbOfCallUsed] == 0)
+ return 0.0;
+
double numerator = ((double)(M_counters[P_NbOfCallUsed]) *
(double)(M_counters[P_Squares])) - ((double)(M_counters[P_SumCounter] *
M_counters[P_SumCounter]));
double denominator = (double)(M_counters[P_NbOfCallUsed]) *
(((double)(M_counters[P_NbOfCallUsed])) - 1.0);
@@ -690,6 +693,8 @@ double CStat::computeStdev(E_CounterName
double CStat::computeMean(E_CounterName P_SumCounter,
E_CounterName P_NbOfCallUsed) {
+ if (M_counters[P_NbOfCallUsed] == 0)
+ return 0.0;
return ((double)(M_counters[P_SumCounter]) /
(double)(M_counters[P_NbOfCallUsed]));
}
"Juan Antonio Alvarez" <[EMAIL PROTECTED]>
03/16/2007 04:46 PM
To
Charles P Wright/Watson/[EMAIL PROTECTED]
cc
Subject
Re: [Sipp-users] BUG?: negative call lengths / response times should be
set to zero
On 3/16/07, Charles P Wright <[EMAIL PROTECTED]> wrote:
>
> Juan,
>
> After a quick test I didn't see this problem crop up on my machine, but
this
> patch does fix a format problem with the printf. Does this make things
any
> better? About how long are your calls?
Calls of duration 0.
>
> Also what OS/CPU are you using (output of uname -a)?
This is a Ubuntu Dapper 6.06 (std kernel)
Linux triton 2.6.15-27-amd64-generic #1 SMP PREEMPT Fri Dec 8 17:50:54
UTC 2006 x86_64 GNU/Linux.
CPU is a Turion 64 X2.
>
> Charles
>
> Index: sipp.2007-03-14/stat.cpp
> ===================================================================
> --- sipp.2007-03-14.orig/stat.cpp
> +++ sipp.2007-03-14/stat.cpp
> @@ -1476,7 +1476,7 @@ char* CStat::msToHHMMSSmmm (unsigned lon
> mm = (sec - hh * 3600) / 60;
> ss = sec - (hh * 3600) - (mm * 60);
> mmm = P_ms - (hh * 3600000) - (mm * 60000) - (ss*1000);
> - sprintf (L_time, "%2.2d:%2.2d:%2.2d:%3.3d", hh, mm, ss, mmm);
> + sprintf (L_time, "%2.2lu:%2.2lu:%2.2lu:%3.3lu", hh, mm, ss, mmm);
> return (L_time);
> } /* end of msToHHMMSS */
>
>
> [EMAIL PROTECTED] wrote on
> 03/15/2007 06:24:13 PM:
>
>
> > Could this be a bug?
> >
> > I get
> >
> > Call Length | -2047687697:12:55:808 |
> -2047687697:12:55:808
> >
> > in sipp.2007-03-14
> >
> > Similar thing happen with response time in the stats file.
> >
> > Juan
> >
Output of uac_*_.csv after aplying patch:
ResponseTime1(P)
2562047788015:12:55:808
00:00:00:000
ResponseTime1StDev(P)
0
323
ResponseTime2(P)
0
547
ResponseTime2StDev(P)
0
323
Only diffenrence, it's not a negativa value. See the different formats
on the outputs. Is that correct?
Looks to me that on the first run it's substracting from nothing.
Hope I can help.
Juan
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users