Examples of TPS


Examples of org.jpos.util.TPS

        final int COUNT = 100000;
        ISOPackager p = new GenericPackager ("src/main/resources/packager/iso87binary.xml");
        ISOMsg baseMsg = getMsg("ISO87");
        System.out.println ("\n--- pack/unpack performance test ---\n");
        Profiler prof = new Profiler();
        TPS tps = new TPS(true);
        for (int i=0; i<COUNT; i++) {
            pack (baseMsg, p);
            tps.tick();
        }
        prof.checkPoint ("PACK " + tps.toString());

        byte[] buf = baseMsg.pack();
        tps = new TPS(true);
        for (int i=0; i<COUNT; i++) {
            unpack (buf, p);
            tps.tick();
        }
        prof.checkPoint ("UNPACK " + tps.toString());

        tps = new TPS(true);
        for (int i=0; i<COUNT; i++) {
            pack (baseMsg, p);
            unpack (buf, p);
            tps.tick();
        }
        prof.checkPoint ("PACK/UNPACK " + tps.toString());
        tps = new TPS(true);
        for (int i=0; i<COUNT; i++) {
            updatePackAndUnpack(baseMsg, p);
            tps.tick();
        }
        prof.checkPoint ("UPDATE/PACK/UNPACK " + tps.toString());

        prof.dump(System.out, "");
        System.out.println ("");
    }
View Full Code Here

Examples of org.jpos.util.TPS

            }
        };
    }

    public void actionPerformed(ActionEvent e) {
        TPS t = txnmgr.getTPS();
        tps.setText (Integer.toString (t.intValue()));
        tpsAvg.setText (String.format ("%.2f", t.getAvg()));
        tpsPeak.setText (Integer.toString (t.getPeak()));
    }
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.