Tabnine Logo
TPS.getPeak
Code IndexAdd Tabnine to your IDE (free)

How to use
getPeak
method
in
org.jpos.util.TPS

Best Java code snippets using org.jpos.util.TPS.getPeak (Showing top 4 results out of 315)

origin: jpos/jPOS

@Override
public int getTPSPeak() {
  return tps.getPeak();
}
origin: jpos/jPOS

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()));
}
origin: jpos/jPOS

public String toString() {
  return String.format("tps=%d, peak=%d, avg=%.2f", intValue(), getPeak(), getAvg());
}
origin: jpos/jPOS

public void test1000TPSAutoUpdate() throws Exception {
  TPS tps = new TPS(true);
  for (int i=0; i<1000; i++)
    tps.tick();
  Thread.sleep (1050L); // java.util.Timer is not accurate
  assertEquals("Expected 1000 TPS", 1000, tps.intValue());
  assertEquals("Still expecting 1000 TPS on a second call", 1000, tps.intValue());
  Thread.sleep (1000L);
  assertTrue ("Average should be aprox 0.5 but it's " + tps.getAvg(), tps.getAvg() >= 0.5);
  assertEquals(
    "TPS should be zero but it's "+tps.intValue() + " (" + tps.floatValue() + ")",
    0, tps.intValue()
  );
  assertEquals ("Peak has to be 1000", 1000, tps.getPeak());
  tps.stop();
}
public void test1000TPSManualUpdate() throws Exception {
org.jpos.utilTPSgetPeak

Popular methods of TPS

  • <init>
  • tick
  • floatValue
  • getAvg
  • intValue
  • stop
  • toString
  • calcTPS
  • dump
  • getElapsed
  • getNanoTime
  • getPeakWhen
  • getNanoTime,
  • getPeakWhen,
  • reset

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • runOnUiThread (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now