com.sun.sgs.profile
Interface ProfileReport


public interface ProfileReport

The interface used to report profiling data associated with a complete task run through the scheduler.


Method Summary
 AccessedObjectsDetail getAccessedObjectsDetail()
          Returns detail of the object accesses as reported by the AccessCoordinator or null if no objects were accessed, no accesses reported, or if this report is for a non-transactional task.
 long getActualStartTime()
          Returns the time at which the task actually started running.
 Throwable getFailureCause()
          Returns any failure that occurred during the execution of this report's task, or null if no failure occurred.
 Set<TransactionListenerDetail> getListenerDetails()
          Returns detail about each listener for the transaction, or an empty Set if the task was not transactional or had no listeners.
 Set<ProfileParticipantDetail> getParticipantDetails()
          Returns detail about each participant in the transaction, or an empty Set if the task was not transactional.
 int getReadyCount()
          Returns the number of tasks in the scheduler and ready to run when this report's task was started.
 List<String> getReportedOperations()
          Returns the operations that were reported as executed during the running of the task.
 int getRetryCount()
          Returns the number of times this task has been tried.
 long getRunningTime()
          Returns the length of time spent running the task.
 long getScheduledStartTime()
          Returns the time at which that task was scheduled to run.
 KernelRunnable getTask()
          Returns the run task that generated this report.
 Identity getTaskOwner()
          Returns the owner of the run task.
 byte[] getTransactionId()
          Returns the identifier for the task's transaction, or null if the task was not transactional.
 Map<String,Long> getUpdatedTaskCounters()
          Returns the values of the task-local counters that were updated during the running of the task.
 Map<String,List<Long>> getUpdatedTaskSamples()
          Returns the list of values for the task-local samples that were updated during the running of the task.
 boolean wasTaskSuccessful()
          Returns whether the task successfully ran to completion.
 boolean wasTaskTransactional()
          Returns whether any of the task was transactional.
 

Method Detail

getTask

KernelRunnable getTask()
Returns the run task that generated this report.

Returns:
the KernelRunnable that was run

getTaskOwner

Identity getTaskOwner()
Returns the owner of the run task.

Returns:
the Identity of the task owner

wasTaskTransactional

boolean wasTaskTransactional()
Returns whether any of the task was transactional.

Returns:
true if any part of the task ran transactionally, false otherwise

getTransactionId

byte[] getTransactionId()
Returns the identifier for the task's transaction, or null if the task was not transactional.

Returns:
the transaction identifier or null

getParticipantDetails

Set<ProfileParticipantDetail> getParticipantDetails()
Returns detail about each participant in the transaction, or an empty Set if the task was not transactional.

Returns:
a Set of ProfileParticipantDetail

getListenerDetails

Set<TransactionListenerDetail> getListenerDetails()
Returns detail about each listener for the transaction, or an empty Set if the task was not transactional or had no listeners.

Returns:
a Set of TransactionListenerDetail

wasTaskSuccessful

boolean wasTaskSuccessful()
Returns whether the task successfully ran to completion. If this task was transactional, then this means that the task committed successfully.

Returns:
true if this task completed successfully, false otherwise

getScheduledStartTime

long getScheduledStartTime()
Returns the time at which that task was scheduled to run.

Returns:
the requested starting time for the task in milliseconds since January 1, 1970

getActualStartTime

long getActualStartTime()
Returns the time at which the task actually started running.

Returns:
the actual starting time for the task in milliseconds since January 1, 1970

getRunningTime

long getRunningTime()
Returns the length of time spent running the task. Note that this is wall-clock time, not the time actually spent running on the processor.

Returns:
the length in milliseconds to execute the task

getRetryCount

int getRetryCount()
Returns the number of times this task has been tried. If this is the first time the task has been run, then this method returns 1.

Returns:
the number of times this task has been tried

getReportedOperations

List<String> getReportedOperations()
Returns the operations that were reported as executed during the running of the task. If no operations were reported, then an empty List is returned.

Returns:
a List of Strings of the names of the reported operations, in the order they were reported

getUpdatedTaskCounters

Map<String,Long> getUpdatedTaskCounters()
Returns the values of the task-local counters that were updated during the running of the task. If no task-local counters were updated, then an empty Map is returned. The Map is a mapping from counter name to counter value.

Returns:
a Map from counter name to observed value

getUpdatedTaskSamples

Map<String,List<Long>> getUpdatedTaskSamples()
Returns the list of values for the task-local samples that were updated during the running of the task. If no task-local samples were updated, then an empty Map is returned. The Map is a mapping from sample name to an oldest-first list of sample values.

Returns:
a Map from sample name to a list of values added during the task

getAccessedObjectsDetail

AccessedObjectsDetail getAccessedObjectsDetail()
Returns detail of the object accesses as reported by the AccessCoordinator or null if no objects were accessed, no accesses reported, or if this report is for a non-transactional task.

Returns:
the associated access detail or null

getReadyCount

int getReadyCount()
Returns the number of tasks in the scheduler and ready to run when this report's task was started.

Returns:
the number of ready tasks

getFailureCause

Throwable getFailureCause()
Returns any failure that occurred during the execution of this report's task, or null if no failure occurred. This Throwable will always be null if wasTaskSuccessful() returns true.

Returns:
the Throwable thrown during task execution or null if no failure occurred

RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved