Examples of BandWidth


Examples of freenet.clients.http.wizardsteps.BANDWIDTH

    steps.put(WIZARD_STEP.WELCOME, new WELCOME(config));
    steps.put(WIZARD_STEP.BROWSER_WARNING, new BROWSER_WARNING());
    steps.put(WIZARD_STEP.NAME_SELECTION, new NAME_SELECTION(config));
    steps.put(WIZARD_STEP.DATASTORE_SIZE, new DATASTORE_SIZE(core, config));
    steps.put(WIZARD_STEP.OPENNET, new OPENNET());
    steps.put(WIZARD_STEP.BANDWIDTH, new BANDWIDTH());
    steps.put(WIZARD_STEP.BANDWIDTH_MONTHLY, new BANDWIDTH_MONTHLY(core, config));
    steps.put(WIZARD_STEP.BANDWIDTH_RATE, new BANDWIDTH_RATE(core, config));

    //Add step handlers that are set by presets
    stepMISC = new MISC(core, config);
View Full Code Here

Examples of org.ngrinder.monitor.share.domain.BandWidth

   */
  public synchronized SystemInfo execute() {
    SystemInfo systemInfo = new SystemInfo();
    systemInfo.setCollectTime(System.currentTimeMillis());
    try {
      BandWidth networkUsage = getNetworkUsage();
      BandWidth bandWidth = networkUsage.adjust(prev.getBandWidth());
      systemInfo.setBandWidth(bandWidth);
      systemInfo.setCPUUsedPercentage((float) sigar.getCpuPerc().getCombined() * 100);
      Cpu cpu = sigar.getCpu();
      systemInfo.setTotalCpuValue(cpu.getTotal());
      systemInfo.setIdleCpuValue(cpu.getIdle());
View Full Code Here

Examples of org.ngrinder.monitor.share.domain.BandWidth

   *
   * @return BandWith
   * @throws SigarException thrown when the underlying lib is not linked
   */
  public BandWidth getNetworkUsage() throws SigarException {
    BandWidth bandWidth = new BandWidth(System.currentTimeMillis());
    for (String each : netInterfaces) {
      try {
        NetInterfaceStat netInterfaceStat = sigar.getNetInterfaceStat(each);
        bandWidth.setReceived(bandWidth.getReceived() + netInterfaceStat.getRxBytes());
        bandWidth.setSent(bandWidth.getSent() + netInterfaceStat.getTxBytes());
      } catch (Exception e) {
        NoOp.noOp();
      }
    }
    return bandWidth;
View Full Code Here

Examples of org.ngrinder.monitor.share.domain.BandWidth

    this.system = String.valueOf(systemInfo.getSystem());
    this.collectTime = systemInfo.getCollectTime();
    this.freeMemory = systemInfo.getFreeMemory();
    this.totalMemory = systemInfo.getTotalMemory();
    this.cpuUsedPercentage = systemInfo.getCPUUsedPercentage();
    BandWidth bandWidth = systemInfo.getBandWidth();
    if (bandWidth != null) {
      this.receivedPerSec = bandWidth.getReceivedPerSec();
      this.sentPerSec = bandWidth.getSentPerSec();
    }
    this.customValues = systemInfo.getCustomValues();
    this.version = version;
  }
View Full Code Here

Examples of org.ngrinder.monitor.share.domain.BandWidth

    boolean received = false;

    while (i++ < 3) {
      SystemInfo systemInfo = collector.execute();
      ThreadUtils.sleep(2000);
      BandWidth bandWidth = systemInfo.getBandWidth();
      if (bandWidth.getReceivedPerSec() != 0) {
        received = true;
      }
      if (bandWidth.getSentPerSec() != 0) {
        sent = true;
      }
      assertThat(systemInfo.getFreeMemory(), not(0l));
      assertThat(systemInfo.getTotalMemory(), not(0l));
    }
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.