[CalendarServer-changes] [6116] CalendarServer/trunk/contrib/performance/compare.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Aug 18 15:07:14 PDT 2010
Revision: 6116
http://trac.macosforge.org/projects/calendarserver/changeset/6116
Author: exarkun at twistedmatrix.com
Date: 2010-08-18 15:07:13 -0700 (Wed, 18 Aug 2010)
Log Message:
-----------
more comprehensible output and output formatting
Modified Paths:
--------------
CalendarServer/trunk/contrib/performance/compare.py
Modified: CalendarServer/trunk/contrib/performance/compare.py
===================================================================
--- CalendarServer/trunk/contrib/performance/compare.py 2010-08-18 22:01:49 UTC (rev 6115)
+++ CalendarServer/trunk/contrib/performance/compare.py 2010-08-18 22:07:13 UTC (rev 6116)
@@ -34,9 +34,11 @@
stat, first = select(first, *sys.argv[3:])
stat, second = select(second, *sys.argv[3:])
- p =ttest_1samp(second, stats.mean(first))[1][0]
- if p < 0.05:
- print 'different', p # rejected the null hypothesis
+ fmean = stats.mean(first)
+ p = 1 - ttest_1samp(second, fmean)[1][0]
+ if p >= 0.95:
+ # rejected the null hypothesis
+ print sys.argv[1], 'mean of', fmean, 'differs from', sys.argv[2], 'mean of', stats.mean(second), '(%2.0f%%)' % (p * 100,)
else:
- print 'same', p # failed to reject the null hypothesis
-
+ # failed to reject the null hypothesis
+ print 'cannot prove means differ (%2.0f%%)' % (p * 100,)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100818/74b09333/attachment.html>
More information about the calendarserver-changes
mailing list