What version of the code was this generated against? Patch fails and the code doesn't match the repo. Thanks, - Will

On Jan 16, 2009, at 10:33 AM, Amanda Waite wrote:

Please review and commit the attached patch for Olio-34 and Olio-28 to the Olio Rails driver.

The fixes are in the same part of the code and to me at least, it makes a lot of sense to combine them into a single patch.

Thanks

Amanda
ISV-Engineering, Sun Microsystems
# This patch file was generated by NetBeans IDE
# Following Index: paths are relative to: /Users/aw74431/ NetBeansProjects/RailsDriverSVN/src/com/sun/web20/driver # This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: UIDriver.java
--- UIDriver.java Base (BASE)
+++ UIDriver.java Locally Modified (Based On LOCAL)
@@ -568,6 +568,7 @@
        }

        ctx.recordTime();
+        ++driverMetrics.addEventTotal;
    }

    @BenchmarkOperation (
@@ -614,6 +615,7 @@
        addAddress(post);
        doMultiPartPost(post);
        ctx.recordTime();
+        ++driverMetrics.addPersonTotal;
    }

    @BenchmarkOperation (
@@ -880,6 +882,8 @@
        int eventDetailImages = 0;
        int homePageImagesLoaded = 0;
        long homePageImageBytes = 0;
+        int addEventTotal = 0;
+        int addPersonTotal = 0;

        public void add(CustomMetrics other) {
            UIDriverMetrics o = (UIDriverMetrics) other;
@@ -890,19 +894,22 @@
            eventDetailImages += o.eventDetailImages;
            homePageImageBytes += o.homePageImageBytes;
            homePageImagesLoaded += o.homePageImagesLoaded;
+            addEventTotal += o.addEventTotal;
+            addPersonTotal += o.addPersonTotal;
+
        }

        public Element[] getResults() {
            Result r = Result.getInstance();
            int total = r.getOpsCountSteady("EventDetail");
-            Element[] el = new Element[7];
+            Element[] el = new Element[10];
            el[0] = new Element();
el[0].description = "% EventDetail views where attendee added";
-            el[0].target = ">= 8";
+            el[0].target = ">= 6";
            if (total > 0) {
double pctAdd = 100d * addAttendeeCount / (double) total;
                el[0].result = String.format("%.2f", pctAdd);
-                if (pctAdd >= 8d)
+                if (pctAdd >= 6d)
                    el[0].passed = Boolean.TRUE;
                else
                    el[0].passed = Boolean.FALSE;
@@ -934,11 +941,11 @@

            el[3] = new Element();
            el[3].description = "Average images loaded per Home Page";
-            el[3].target = ">= 4";
+            el[3].target = ">= 3";
            if (cnt > 0) {
                double avgImgs = homePageImagesLoaded / (double) cnt;
                el[3].result = String.format("%.2f", avgImgs);
-                if (avgImgs >= 4d)
+                if (avgImgs >= 3d)
                    el[3].passed = Boolean.TRUE;
                else
                    el[3].passed = Boolean.FALSE;
@@ -949,11 +956,11 @@

            el[4] = new Element();
el[4].description = "Average image bytes received per Home Page";
-            el[4].target = ">= 25000";
+            el[4].target = ">= 15000";
            if (cnt > 0) {
                double avgBytes = homePageImageBytes / (double) cnt;
                el[4].result = String.format("%.2f", avgBytes);
-                if (avgBytes >= 20000)
+                if (avgBytes >= 15000)
                    el[4].passed = Boolean.TRUE;
                else
                    el[4].passed = Boolean.FALSE;
@@ -964,11 +971,11 @@
            cnt = r.getOpsCountSteady("TagSearch");
            el[5] = new Element();
el[5].description = "Average images on Tag Search Results";
-            el[5].target = ">= 3";
+            el[5].target = ">= 3.6";
            if (cnt > 0) {
                double avgImgs = tagSearchImages / (double) cnt;
                el[5].result = String.format("%.2f", avgImgs);
-                if (avgImgs >= 3d)
+                if (avgImgs >= 3.6d)
                    el[5].passed = Boolean.TRUE;
                else
                    el[5].passed = Boolean.FALSE;
@@ -978,7 +985,7 @@
            }
            el[6] = new Element();
            el[6].description = "Average images on Event Detail";
-            el[6].target = ">= 9";
+            el[6].target = ">= 1";
            if (total > 0) {
                double avgImgs = eventDetailImages / (double) total;
                el[6].result = String.format("%.2f", avgImgs);
@@ -990,6 +997,21 @@
                el[6].result = "";
                el[6].passed = Boolean.FALSE;
            }
+            el[7] = new Element();
+            el[7].description = "Total successful AddEvent calls";
+            el[7].result = String.valueOf(addEventTotal);
+            el[8] = new Element();
+            el[8].description = "Total successful AddPerson calls";
+            el[8].result = String.valueOf(addPersonTotal);
+            el[9] = new Element();
+            el[9].description = "Concurrent user to ops/sec ratio";
+            el[9].target = "<= 5.25";
+            double ratio = r.getScale() / r.getMetric();
+            el[9].result = String.format("%.2f", ratio);
+            if (ratio <= 5.25d)
+                el[9].passed = true;
+            else
+                el[9].passed = false;
            return el;
        }

@@ -1002,6 +1024,8 @@
            clone.eventDetailImages = eventDetailImages;
            clone.homePageImageBytes = homePageImageBytes;
            clone.homePageImagesLoaded = homePageImagesLoaded;
+            clone.addEventTotal = addEventTotal;
+            clone.addPersonTotal = addPersonTotal;
            return clone;
        }
    }

Reply via email to