Examples of seconds()


Examples of org.apache.curator.test.Timing.seconds()

                                    semaphore.release();
                                    Assert.assertTrue(timing.awaitLatch(latch));
                                    return super.getChildrenForEntering();
                                }
                            };
                            Assert.assertTrue(barrier.enter(timing.seconds(), TimeUnit.SECONDS));
                            Assert.assertTrue(barrier.leave(timing.seconds(), TimeUnit.SECONDS));
                            return null;
                        }
                    }
                );
View Full Code Here

Examples of org.apache.curator.test.Timing.seconds()

                                    Assert.assertTrue(timing.awaitLatch(latch));
                                    return super.getChildrenForEntering();
                                }
                            };
                            Assert.assertTrue(barrier.enter(timing.seconds(), TimeUnit.SECONDS));
                            Assert.assertTrue(barrier.leave(timing.seconds(), TimeUnit.SECONDS));
                            return null;
                        }
                    }
                );
            }
View Full Code Here

Examples of org.apache.curator.test.Timing.seconds()

                        }
                    }
                );
            }

            Assert.assertTrue(semaphore.tryAcquire(QTY + 1, timing.seconds(), TimeUnit.SECONDS));   // wait until all QTY+1 barriers are trying to enter
            latch.countDown();

            for ( int i = 0; i < (QTY + 1); ++i )
            {
                completionService.take().get(); // to check for assertions
View Full Code Here

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

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

            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

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

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

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

            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

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

            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

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

            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

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

                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.