Package eu.stratosphere.nephele.profiling.impl.types

Examples of eu.stratosphere.nephele.profiling.impl.types.InternalInstanceProfilingData


    long transmittedBytesSum = 0;

    // Sum up the individual values
    while (instanceIterator.hasNext()) {

      final InternalInstanceProfilingData profilingData = this.collectedInstanceProfilingData
        .get(instanceIterator.next());

      freeMemorySum += profilingData.getFreeMemory();
      ioWaitCPUSum += profilingData.getIOWaitCPU();
      idleCPUSum += profilingData.getIdleCPU();
      profilingIntervalSum += profilingData.getProfilingInterval();
      systemCPUSum += profilingData.getSystemCPU();
      hardIrqCPUSum += profilingData.getHardIrqCPU();
      softIrqCPUSum += profilingData.getSoftIrqCPU();
      totalMemorySum += profilingData.getTotalMemory();
      userCPUSum += profilingData.getUserCPU();
      receivedBytesSum += profilingData.getReceivedBytes();
      transmittedBytesSum += profilingData.getTransmittedBytes();
      bufferedMemorySum += profilingData.getBufferedMemory();
      cachedMemorySum += profilingData.getCachedMemory();
      cachedSwapMemorySum += profilingData.getCachedSwapMemory();
    }

    final InstanceSummaryProfilingEvent instanceSummary = new InstanceSummaryProfilingEvent(profilingIntervalSum
      / numberOfInstances, ioWaitCPUSum / numberOfInstances, idleCPUSum / numberOfInstances, userCPUSum
      / numberOfInstances, systemCPUSum / numberOfInstances, hardIrqCPUSum / numberOfInstances, softIrqCPUSum
View Full Code Here


  InternalInstanceProfilingData generateProfilingData(long timestamp) throws ProfilingException {

    final long profilingInterval = timestamp - lastTimestamp;

    final InternalInstanceProfilingData profilingData = new InternalInstanceProfilingData(
      this.instanceConnectionInfo, (int) profilingInterval);

    updateCPUUtilization(profilingData);
    updateMemoryUtilization(profilingData);
    updateNetworkUtilization(profilingData);
View Full Code Here

   * @throws ProfilingException
   */
  public InternalInstanceProfilingData generateCheckpointProfilingData() throws ProfilingException {
    final long profilingInterval = System.currentTimeMillis() - this.firstTimestamp;

    final InternalInstanceProfilingData profilingData = new InternalInstanceProfilingData(
      this.instanceConnectionInfo, (int) profilingInterval);

    updateCPUUtilization(profilingData);
    updateMemoryUtilization(profilingData);
    updateNetworkUtilization(profilingData);
View Full Code Here

  @Override
  public void run() {

    final long timestamp = System.currentTimeMillis();
    InternalInstanceProfilingData instanceProfilingData = null;

    // Collect profiling information of the threads
    synchronized (this.monitoredThreads) {

      final Iterator<Environment> iterator = this.monitoredThreads.keySet().iterator();
View Full Code Here

  @Test
  public void shouldHaveNetworkTraffic() {

    try {
      final InternalInstanceProfilingData generateProfilingData = out.generateProfilingData(0L);
      assertEquals(0L, generateProfilingData.getReceivedBytes());
      assertEquals(0L, generateProfilingData.getTransmittedBytes());
    } catch (ProfilingException e) {
      fail(e.getMessage());
    }
  }
View Full Code Here

  @Test
  public void shouldHaveMemSettingsMeasured() {

    try {
      final InternalInstanceProfilingData generateProfilingData = out.generateProfilingData(0L);

      final long totalMemory = generateProfilingData.getTotalMemory();
      assertThat(totalMemory, is(equalTo(8052956L)));

      long freeMemory = generateProfilingData.getFreeMemory();
      assertThat(freeMemory, is(equalTo(3999880L)));

      long buffers = generateProfilingData.getBufferedMemory();
      assertThat(buffers, is(equalTo(77216L)));

      long cached = generateProfilingData.getCachedMemory();
      assertThat(cached, is(equalTo(1929640L)));
    } catch (ProfilingException e) {
      fail(e.getMessage());
    }
  }
View Full Code Here

  @Test
  public void shouldMeasureCPUUtilization() {

    try {
      final InternalInstanceProfilingData generateProfilingData = out.generateProfilingData(0L);

      assertEquals(0L, generateProfilingData.getUserCPU());
      assertEquals(0L, generateProfilingData.getIdleCPU());
      assertEquals(0L, generateProfilingData.getSystemCPU());
      assertEquals(0L, generateProfilingData.getHardIrqCPU());
      assertEquals(0L, generateProfilingData.getSoftIrqCPU());
      assertEquals(0L, generateProfilingData.getIOWaitCPU());
    } catch (ProfilingException e) {
      fail(e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of eu.stratosphere.nephele.profiling.impl.types.InternalInstanceProfilingData

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.