[CalendarServer-changes] [9701] CalendarServer/trunk/contrib/performance

source_changes at macosforge.org source_changes at macosforge.org
Tue Aug 14 10:36:10 PDT 2012


Revision: 9701
          http://trac.macosforge.org/projects/calendarserver/changeset/9701
Author:   dre at apple.com
Date:     2012-08-14 10:36:08 -0700 (Tue, 14 Aug 2012)
Log Message:
-----------
Add a huge bucket and a FixedDistribution, also more QoS tweaks

Modified Paths:
--------------
    CalendarServer/trunk/contrib/performance/loadtest/ical.py
    CalendarServer/trunk/contrib/performance/loadtest/test_population.py
    CalendarServer/trunk/contrib/performance/loadtest/thresholds.json
    CalendarServer/trunk/contrib/performance/stats.py

Modified: CalendarServer/trunk/contrib/performance/loadtest/ical.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/ical.py	2012-08-14 06:43:42 UTC (rev 9700)
+++ CalendarServer/trunk/contrib/performance/loadtest/ical.py	2012-08-14 17:36:08 UTC (rev 9701)
@@ -921,8 +921,10 @@
         label_suffix = "small"
         if len(events) > 5:
             label_suffix = "medium"
-        if len(events) > 15:
+        if len(events) > 20:
             label_suffix = "large"
+        if len(events) > 75:
+            label_suffix = "huge"
 
         return self._report(
             calendar,
@@ -1295,8 +1297,10 @@
         label_suffix = "small"
         if len(attendees) > 5:
             label_suffix = "medium"
-        if len(attendees) > 15:
+        if len(attendees) > 20:
             label_suffix = "large"
+        if len(attendees) > 75:
+            label_suffix = "huge"
         
         # At last, upload the new event definition
         response = yield self._request(
@@ -1375,8 +1379,10 @@
         label_suffix = "small"
         if len(attendees) > 5:
             label_suffix = "medium"
-        if len(attendees) > 15:
+        if len(attendees) > 20:
             label_suffix = "large"
+        if len(attendees) > 75:
+            label_suffix = "huge"
         
         response = yield self._request(
             okCodes,
@@ -1416,8 +1422,10 @@
         label_suffix = "small"
         if len(attendees) > 5:
             label_suffix = "medium"
-        if len(attendees) > 15:
+        if len(attendees) > 20:
             label_suffix = "large"
+        if len(attendees) > 75:
+            label_suffix = "huge"
 
         response = yield self._request(
             CREATED,
@@ -1526,8 +1534,10 @@
         label_suffix = "small"
         if len(users) > 5:
             label_suffix = "medium"
-        if len(users) > 15:
+        if len(users) > 20:
             label_suffix = "large"
+        if len(users) > 75:
+            label_suffix = "huge"
 
         response = yield self._request(
             OK, 'POST', outbox,

Modified: CalendarServer/trunk/contrib/performance/loadtest/test_population.py
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/test_population.py	2012-08-14 06:43:42 UTC (rev 9700)
+++ CalendarServer/trunk/contrib/performance/loadtest/test_population.py	2012-08-14 17:36:08 UTC (rev 9701)
@@ -163,7 +163,7 @@
 
     def test_bucketRequest(self):
         """
-        PUT(xxx-large/medium/small} have different thresholds. Test that requests straddling
+        PUT(xxx-huge/large/medium/small} have different thresholds. Test that requests straddling
         each of those are correctly determined to be failures or not.
         """
         
@@ -175,6 +175,7 @@
                     "PUT{organizer-small}": [ 100.0,  50.0,  25.0,   5.0,   1.0,   0.5,   0.0],
                     "PUT{organizer-medium}":[ 100.0, 100.0,  50.0,  25.0,   5.0,   1.0,   0.5],
                     "PUT{organizer-large}": [ 100.0, 100.0, 100.0,  50.0,  25.0,   5.0,   1.0],
+                    "PUT{organizer-huge}":  [ 100.0, 100.0, 100.0, 100.0, 100.0,  50.0,  25.0],
                 }
             }
         }
@@ -290,3 +291,40 @@
             logger.failures()
         )
 
+        # -huge below 10.0 threshold
+        logger = ReportStatistics(thresholds=_thresholds)
+        logger.observe(dict(
+                type='response', method='PUT{organizer-huge}', success=True,
+                duration=12.0, user='user01', client_type="test", client_id="1234"))
+        logger.observe(dict(
+                type='response', method='PUT{organizer-huge}', success=True,
+                duration=8, user='user01', client_type="test", client_id="1234"))
+        logger.observe(dict(
+                type='response', method='PUT{organizer-huge}', success=True,
+                duration=11.0, user='user01', client_type="test", client_id="1234"))
+        logger.observe(dict(
+                type='response', method='PUT{organizer-huge}', success=True,
+                duration=9.0, user='user01', client_type="test", client_id="1234"))
+        self.assertEqual(
+            [],
+            logger.failures()
+        )
+        
+        # -huge above 10.0 threshold
+        logger = ReportStatistics(thresholds=_thresholds)
+        logger.observe(dict(
+                type='response', method='PUT{organizer-huge}', success=True,
+                duration=12.0, user='user01', client_type="test", client_id="1234"))
+        logger.observe(dict(
+                type='response', method='PUT{organizer-huge}', success=True,
+                duration=9.0, user='user01', client_type="test", client_id="1234"))
+        logger.observe(dict(
+                type='response', method='PUT{organizer-huge}', success=True,
+                duration=12.0, user='user01', client_type="test", client_id="1234"))
+        logger.observe(dict(
+                type='response', method='PUT{organizer-huge}', success=True,
+                duration=42.42, user='user01', client_type="test", client_id="1234"))
+        self.assertEqual(
+            ["Greater than 50% PUT{organizer-huge} exceeded 10 second response time"],
+            logger.failures()
+        )

Modified: CalendarServer/trunk/contrib/performance/loadtest/thresholds.json
===================================================================
--- CalendarServer/trunk/contrib/performance/loadtest/thresholds.json	2012-08-14 06:43:42 UTC (rev 9700)
+++ CalendarServer/trunk/contrib/performance/loadtest/thresholds.json	2012-08-14 17:36:08 UTC (rev 9701)
@@ -8,23 +8,26 @@
 			"GET{event}"                    : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0],
 	
 			"PUT{event}"                    : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   0.5],
-			"PUT{attendee-small}"           : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   0.5],
+			"PUT{attendee-small}"           : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0],
 			"PUT{attendee-medium}"          : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0], 
 			"PUT{attendee-large}"           : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0],
-			"PUT{organizer-small}"          : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   0.5], 
-			"PUT{organizer-medium}"         : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   0.5],
+			"PUT{attendee-huge}"            : [ 100.0, 100.0, 100.0, 100.0, 100.0,  50.0,  25.0],
+			"PUT{organizer-small}"          : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0], 
+			"PUT{organizer-medium}"         : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0],
 			"PUT{organizer-large}"          : [ 100.0, 100.0, 100.0, 100.0, 100.0,  75.0,  25.0],
+			"PUT{organizer-huge}"           : [ 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0],
 	
-			"DELETE{event}"                 : [ 100.0,  50.0,  25.0,   5.0,   1.0,   0.5,   0.0],
+			"DELETE{event}"                 : [ 100.0, 100.0,  50.0,  25.0,  10.0,   5.0,   1.0],
 	
 			"POST{fb-small}"                : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0],
 			"POST{fb-medium}"               : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0], 
 			"POST{fb-large}"                : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,   5.0], 
+			"POST{fb-huge}"                 : [ 100.0, 100.0, 100.0, 100.0,  75.0,  50.0,  25.0], 
 	
 			"PROPFIND{well-known}"          : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
 			"PROPFIND{find-principal}"      : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
 			"PROPFIND{principal}"           : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
-			"PROPFIND{home}"                : [ 100.0, 100.0, 100.0,  50.0,  10.0,   0.5,   0.0],
+			"PROPFIND{home}"                : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,  10.0],
 			"PROPFIND{calendar}"            : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
 			"PROPFIND{notification}"        : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
 			"PROPFIND{notification-items}"  : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
@@ -35,12 +38,13 @@
 			"REPORT{expand}"                : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
 			"REPORT{psearch}"               : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
 			"REPORT{sync-init}"             : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
-			"REPORT{sync}"                  : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
+			"REPORT{sync}"                  : [ 100.0, 100.0, 100.0,  50.0,  10.0,   5.0,   1.0],
 			"REPORT{vevent}"                : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
 			"REPORT{vtodo}"                 : [ 100.0, 100.0, 100.0,   5.0,   1.0,   0.5,   0.0],
-			"REPORT{multiget-small}"        : [ 100.0,  50.0,  25.0,   5.0,   1.0,   0.5,   0.0],
-			"REPORT{multiget-medium}"       : [ 100.0, 100.0,  50.0,  25.0,   5.0,   1.0,   0.5],
-			"REPORT{multiget-large}"        : [ 100.0, 100.0, 100.0,  75.0,  50.0,  10.0,   5.0]
+			"REPORT{multiget-small}"        : [ 100.0, 100.0,  50.0,  25.0,  10.0,   5.0,   1.0],
+			"REPORT{multiget-medium}"       : [ 100.0, 100.0,  75.0,  50.0,  25.0,  10.0,   5.0],
+			"REPORT{multiget-large}"        : [ 100.0, 100.0, 100.0,  75.0,  50.0,  25.0,  10.0],
+			"REPORT{multiget-huge}"         : [ 100.0, 100.0, 100.0, 100.0,  75.0,  50.0,  25.0]
         }
     },
     "operations": {

Modified: CalendarServer/trunk/contrib/performance/stats.py
===================================================================
--- CalendarServer/trunk/contrib/performance/stats.py	2012-08-14 06:43:42 UTC (rev 9700)
+++ CalendarServer/trunk/contrib/performance/stats.py	2012-08-14 17:36:08 UTC (rev 9701)
@@ -279,7 +279,21 @@
         return result
 
 
+class FixedDistribution(object, FancyEqMixin):
+    """
+    """
+    implements(IPopulation)
 
+    compareAttributes = ['_value']
+
+    def __init__(self, value):
+        self._value = value
+
+
+    def sample(self):
+        return self._value
+
+
 class NearFutureDistribution(object, FancyEqMixin):
     compareAttributes = ['_offset']
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20120814/c58d5b86/attachment-0001.html>


More information about the calendarserver-changes mailing list