Package com.barchart.udt

Examples of com.barchart.udt.MonitorUDT


      text.append("\t\n");
      log.info("sender options; {}", text);

      long count = 0;

      final MonitorUDT monitor = sender.monitor();

      while (true) {

        for (int k = 0; k < countBatch; k++) {

          final byte[] array = new byte[SIZE];

          putSequenceNumber(array);

          final int result = sender.send(array);

          assert result == SIZE : "wrong size";

        }

        // sleep between batches
        Thread.sleep(countSleep);

        count++;

        if (count % countMonitor == 0) {
          sender.updateMonitor(false);
          text = new StringBuilder(1024);
          monitor.appendSnapshot(text);
          log.info("stats; {}", text);
        }

      }
View Full Code Here


      StringBuilder text = new StringBuilder(1024);
      OptionUDT.appendSnapshot(receiver, text);
      text.append("\t\n");
      log.info("receiver options; {}", text);

      final MonitorUDT monitor = receiver.monitor();

      while (true) {

        final byte[] array = new byte[SIZE];

        final int result = receiver.receive(array);

        assert result == SIZE : "wrong size";

        getSequenceNumber(array);

        if (sequenceNumber % countMonitor == 0) {

          receiver.updateMonitor(false);
          text = new StringBuilder(1024);
          monitor.appendSnapshot(text);
          log.info("stats; {}", text);

          final long timeFinish = System.currentTimeMillis();
          final long timeDiff = 1 + (timeFinish - timeStart) / 1000;
View Full Code Here

        interval = System.currentTimeMillis();

        clientSocket.updateMonitor(true);

        final MonitorUDT mon = clientSocket.monitor();

        log.info(String.format("Current Rate: %.2f Mbs",
            mon.mbpsSendRate()));

        maxMbs = mon.mbpsSendRate() * 0.93;

      }

    }

 
View Full Code Here

        interval = System.currentTimeMillis();

        clientSocket.updateMonitor(true);

        final MonitorUDT mon = clientSocket.monitor();

        log.info(String.format("Current Rate: %.2f Mbs",
            mon.mbpsSendRate()));

        maxMbs = mon.mbpsSendRate() * 0.93;

      }

    }

 
View Full Code Here

      text.append("\t\n");
      log.info("sender options; {}", text);

      long count = 0;

      final MonitorUDT monitor = sender.monitor();

      while (true) {

        for (int k = 0; k < countBatch; k++) {

          final byte[] array = new byte[SIZE];

          putSequenceNumber(array);

          final int result = sender.send(array);

          assert result == SIZE : "wrong size";

        }

        // sleep between batches
        Thread.sleep(countSleep);

        count++;

        if (count % countMonitor == 0) {
          sender.updateMonitor(false);
          text = new StringBuilder(1024);
          monitor.appendSnapshot(text);
          log.info("stats; {}", text);
        }

      }
View Full Code Here

      StringBuilder text = new StringBuilder(1024);
      OptionUDT.appendSnapshot(receiver, text);
      text.append("\t\n");
      log.info("receiver options; {}", text);

      final MonitorUDT monitor = receiver.monitor();

      while (true) {

        final byte[] array = new byte[SIZE];

        final int result = receiver.receive(array);

        assert result == SIZE : "wrong size";

        getSequenceNumber(array);

        if (sequenceNumber % countMonitor == 0) {

          receiver.updateMonitor(false);
          text = new StringBuilder(1024);
          monitor.appendSnapshot(text);
          log.info("stats; {}", text);

          final long timeFinish = System.currentTimeMillis();
          final long timeDiff = 1 + (timeFinish - timeStart) / 1000;
View Full Code Here

TOP

Related Classes of com.barchart.udt.MonitorUDT

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.