Package org.yaml.snakeyaml

Examples of org.yaml.snakeyaml.Invoice


        return new TestSuite(StressEmitterTest.class);
    }

    public void testPerformance() {
        Yaml loader = new Yaml();
        Invoice invoice = loader.loadAs(Util.getLocalResource("specification/example2_27.yaml"),
                Invoice.class);
        Yaml dumper = new Yaml();
        long time1 = System.nanoTime();
        dumper.dumpAsMap(invoice);
        long time2 = System.nanoTime();
View Full Code Here


            System.out.println("Started: " + id);
            Yaml loader = new Yaml();
            long time1 = System.nanoTime();
            int cycles = 200;
            for (int i = 0; i < cycles; i++) {
                Invoice invoice = loader.loadAs(doc, Invoice.class);
                assertNotNull(invoice);
            }
            long time2 = System.nanoTime();
            float duration = ((time2 - time1) / 1000000) / (float) cycles;
            System.out.println("Duration of " + id + " was " + duration + " ms/load.");
View Full Code Here

TOP

Related Classes of org.yaml.snakeyaml.Invoice

Copyright © 2018 www.massapicom. 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.