Package org.apache.jackrabbit.mk.util

Examples of org.apache.jackrabbit.mk.util.StopWatch.seconds()


            StopWatch timer = new StopWatch();
            int t2 = 0;
            for (int i = 0; i < 1000000; i++) {
                t2 += JsopBuilder.encode(s).length();
            }
            System.out.println(timer.seconds() + " dummy: " + t2);
        }
        // old: not escaped: 5691 ms; escaped: 10609 ms
        // new: not escaped: 3931 ms; escaped: 11001 ms
    }
View Full Code Here


            StopWatch timer = new StopWatch();
            int t2 = 0;
            for (int i = 0; i < 10000000; i++) {
                t2 += JsopBuilder.encode(s).length();
            }
            System.out.println(timer.seconds());
        }
        // old: not escaped: 5691 ms; escaped: 10609 ms
        // new: not escaped: 3931 ms; escaped: 11001 ms
    }
View Full Code Here

                w.value(s);
                if (i % 100 == 0) {
                    w.resetWriter();
                }
            }
            System.out.println(w.getClass() + ": " + timer.seconds());
        }
        // JsopStream: 20
        // JsopBuilder: 1150
    }
View Full Code Here

            StopWatch timer = new StopWatch();
            for (int j = 0; j < 10000; j++) {
                JsopObject o = (JsopObject) Jsop.parse(jsop);
                assertEquals(data, o.get("child99"));
            }
            System.out.println(timer.seconds() + " lengthIndex=" + lengthIndex);
        }
    }

    public void testDataType() {
        String s = (String) Jsop.parse("\"Hello\"");
View Full Code Here

            StopWatch timer = new StopWatch();
            int t2 = 0;
            for (int i = 0; i < 10000000; i++) {
                t2 += JsopBuilder.encode(s).length();
            }
            System.out.println(timer.seconds());
        }
        // old: not escaped: 5691 ms; escaped: 10609 ms
        // new: not escaped: 3931 ms; escaped: 11001 ms
    }
View Full Code Here

            StopWatch timer = new StopWatch();
            int t2 = 0;
            for (int i = 0; i < 10000000; i++) {
                t2 += JsopBuilder.encode(s).length();
            }
            System.out.println(timer.seconds() + " dummy: " + t2);
        }
        // old: not escaped: 5691 ms; escaped: 10609 ms
        // new: not escaped: 3931 ms; escaped: 11001 ms
    }
View Full Code Here

                w.value(s);
                if (i % 100 == 0) {
                    w.resetWriter();
                }
            }
            System.out.println(w.getClass() + ": " + timer.seconds());
        }
        // JsopStream: 20
        // JsopBuilder: 1150
    }
View Full Code Here

            StopWatch timer = new StopWatch();
            int t2 = 0;
            for (int i = 0; i < 10000000; i++) {
                t2 += JsopBuilder.encode(s).length();
            }
            System.out.println(timer.seconds());
        }
        // old: not escaped: 5691 ms; escaped: 10609 ms
        // new: not escaped: 3931 ms; escaped: 11001 ms
    }
View Full Code Here

                w.value(s);
                if (i % 100 == 0) {
                    w.resetWriter();
                }
            }
            System.out.println(w.getClass() + ": " + timer.seconds());
        }
        // JsopStream: 20
        // JsopBuilder: 1150
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.