Package org.apache.flink.runtime.profiling.types

Examples of org.apache.flink.runtime.profiling.types.ThreadProfilingEvent


   * Tests serialization/deserialization for {@link ThreadProfilingEvent}.
   */
  @Test
  public void testThreadProfilingEvent() {

    final ThreadProfilingEvent orig = new ThreadProfilingEvent(USER_TIME, SYSTEM_TIME, BLOCKED_TIME, WAITED_TIME,
      new JobVertexID(), 17, new ExecutionAttemptID(), PROFILING_INTERVAL, new JobID(), TIMESTAMP, PROFILING_TIMESTAMP);

    final ThreadProfilingEvent copy = (ThreadProfilingEvent) ManagementTestUtils.createCopy(orig);

    assertEquals(orig.getUserTime(), copy.getUserTime());
    assertEquals(orig.getSystemTime(), copy.getSystemTime());
    assertEquals(orig.getBlockedTime(), copy.getBlockedTime());
    assertEquals(orig.getWaitedTime(), copy.getWaitedTime());
    assertEquals(orig.getVertexID(), copy.getVertexID());
    assertEquals(orig.getProfilingInterval(), copy.getProfilingInterval());
    assertEquals(orig.getJobID(), copy.getJobID());
    assertEquals(orig.getTimestamp(), copy.getTimestamp());
    assertEquals(orig.getProfilingTimestamp(), copy.getProfilingTimestamp());
    assertEquals(orig.hashCode(), copy.hashCode());
    assertTrue(orig.equals(copy));
  }
View Full Code Here


      final List<ProfilingListener> jobListeners = this.registeredListeners.get(profilingData.getJobID());
      if (jobListeners == null) {
        return;
      }

      final ThreadProfilingEvent threadProfilingEvent = new ThreadProfilingEvent(
          profilingData.getUserTime(), profilingData.getSystemTime(), profilingData.getBlockedTime(), profilingData.getWaitedTime(),
          profilingData.getVertexId(), profilingData.getSubtask(), profilingData.getExecutionAttemptId(),
          profilingData.getProfilingInterval(), profilingData.getJobID(), timestamp, (timestamp - profilingStart));

      final Iterator<ProfilingListener> it = jobListeners.iterator();
View Full Code Here

TOP

Related Classes of org.apache.flink.runtime.profiling.types.ThreadProfilingEvent

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.