class MetricsAggregator[KeyT] extends AnyRef
Collects/aggregates metrics across multiple process calls and workflow executions
- Alphabetic
- By Inheritance
- MetricsAggregator
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Instance Constructors
- new MetricsAggregator()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from MetricsAggregator[KeyT] to any2stringadd[MetricsAggregator[KeyT]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
def
+=(m: WorkflowMetrics[KeyT]): Map[KeyT, WorkflowMetrics[KeyT]]
Adds a new WorkflowMetrics instance, taking care of indexing automatically Overwrites a previous instance with the same ID
-
def
+=(m: ProcessMetrics[KeyT]): Map[KeyT, Map[Int, ProcessMetrics[KeyT]]]
Adds a new ProcessMetrics instance, taking care of indexing automatically Overwrites a previous instance with the same IDs
-
def
->[B](y: B): (MetricsAggregator[KeyT], B)
- Implicit
- This member is added by an implicit conversion from MetricsAggregator[KeyT] to ArrowAssoc[MetricsAggregator[KeyT]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
^(piID: KeyT, u: (WorkflowMetrics[KeyT]) ⇒ WorkflowMetrics[KeyT]): Option[Map[KeyT, WorkflowMetrics[KeyT]]]
Updates a WorkflowMetrics instance
Updates a WorkflowMetrics instance
- piID
the workflow ID of the process
- u
a function to update the ProcessMetrics instance
- returns
the updated processMap or scala.None if the identified instance does not exist
Assume function that increases the number of calls WorkflowMetrics to
"x"
:def myUpdate(w: WorkflowMetrics[KeyT]): WorkflowMetrics[KeyT] = w.copy(calls=calls+1)
We can update the metrics of workflow with ID
5
as follows:metricsAggregator ^ (5,myUpdate)
Example: -
def
^(piID: KeyT, ref: Int, u: (ProcessMetrics[KeyT]) ⇒ ProcessMetrics[KeyT]): Option[Map[KeyT, Map[Int, ProcessMetrics[KeyT]]]]
Updates a ProcessMetrics instance.
Updates a ProcessMetrics instance.
- piID
the workflow ID of the process
- ref
the call reference of the process
- u
a function to update the ProcessMetrics instance
- returns
the updated processMap or scala.None if the identified instance does not exist
Assume function that updates the name of a process in ProcessMetrics to
"x"
:def myUpdate(p: ProcessMetrics[KeyT]): ProcessMetrics[KeyT] = p.copy(process="x")
We can update the metrics of process with workflow ID
5
and call reference2
as follows:metricsAggregator ^ (5,2,myUpdate)
Example: -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
ensuring(cond: (MetricsAggregator[KeyT]) ⇒ Boolean, msg: ⇒ Any): MetricsAggregator[KeyT]
- Implicit
- This member is added by an implicit conversion from MetricsAggregator[KeyT] to Ensuring[MetricsAggregator[KeyT]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (MetricsAggregator[KeyT]) ⇒ Boolean): MetricsAggregator[KeyT]
- Implicit
- This member is added by an implicit conversion from MetricsAggregator[KeyT] to Ensuring[MetricsAggregator[KeyT]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): MetricsAggregator[KeyT]
- Implicit
- This member is added by an implicit conversion from MetricsAggregator[KeyT] to Ensuring[MetricsAggregator[KeyT]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): MetricsAggregator[KeyT]
- Implicit
- This member is added by an implicit conversion from MetricsAggregator[KeyT] to Ensuring[MetricsAggregator[KeyT]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from MetricsAggregator[KeyT] to StringFormat[MetricsAggregator[KeyT]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
keys: Iterable[KeyT]
Returns the collection of workflow IDs that have been tracked.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
procCall(piID: KeyT, ref: Int, process: String, time: Long): Unit
Handles the event of an atomic process call, updating its metrics accordingly.
Handles the event of an atomic process call, updating its metrics accordingly.
- piID
the ID of the workflow
- ref
the call reference ID
- process
the name of the atomic process being called
- time
the timestamp to be recorded as the process start
-
def
procReturn(piID: KeyT, ref: Int, result: Any, time: Long = System.currentTimeMillis()): Unit
Handles the event of an atomic process returning successfully, updating its metrics accordingly.
Handles the event of an atomic process returning successfully, updating its metrics accordingly.
- piID
the ID of the workflow
- ref
the call reference ID
- result
the result returned by the process
- time
the timestamp to be recorded as the process finish
-
def
processException(piID: KeyT, ref: Int, ex: Throwable, time: Long = System.currentTimeMillis()): Unit
Handles the event of an atomic process failing with an exception, updating its metrics accordingly.
Handles the event of an atomic process failing with an exception, updating its metrics accordingly.
- piID
the ID of the workflow
- ref
the call reference ID
- ex
the thrown exception (or other scala.Throwable)
- time
the timestamp to be recorded as the process finish
-
def
processFailure(piID: KeyT, ref: Int, ex: String, time: Long = System.currentTimeMillis()): Unit
Handles the event of an atomic process failing in any way, updating its metrics accordingly.
Handles the event of an atomic process failing in any way, updating its metrics accordingly.
- piID
the ID of the workflow
- ref
the call reference ID
- ex
a
String
explanation of what went wrong- time
the timestamp to be recorded as the process finish
-
val
processMap: Map[KeyT, Map[Int, ProcessMetrics[KeyT]]]
Process metrics indexed by workflow ID, then by call reference ID
-
def
processMetrics: Seq[ProcessMetrics[KeyT]]
Returns all the tracked instances of ProcessMetrics sorted by starting time.
-
def
processMetricsOf(id: KeyT): Seq[ProcessMetrics[KeyT]]
Returns all the tracked instances of ProcessMetrics associated with a particular workflow, sorted by starting time.
Returns all the tracked instances of ProcessMetrics associated with a particular workflow, sorted by starting time.
- id
the ID of the workflow
-
def
processSet: SortedSet[String]
Returns a SortedSet of all process names being tracked.
Returns a SortedSet of all process names being tracked. This is useful when using process names as a category, for example to colour code tasks in the timeline.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
workflowException(piID: KeyT, ex: Throwable, time: Long = System.currentTimeMillis()): Unit
Handles the event of a workflow failing with an exception, updating its metrics accordingly.
Handles the event of a workflow failing with an exception, updating its metrics accordingly.
- piID
the ID of the workflow
- ex
the thrown exception (or other scala.Throwable)
- time
the timestamp to be recorded as the workflow finish
-
val
workflowMap: Map[KeyT, WorkflowMetrics[KeyT]]
Workflow metrics indexed by workflow ID
-
def
workflowMetrics: Seq[WorkflowMetrics[KeyT]]
Returns all the tracked instances of WorkflowMetrics sorted by starting time.
-
def
workflowResult(piID: KeyT, result: Any, time: Long = System.currentTimeMillis()): Unit
Handles the event of a workflow finishing successfully, updating its metrics accordingly.
Handles the event of a workflow finishing successfully, updating its metrics accordingly.
- piID
the ID of the workflow
- result
the return value of the workflow
- time
the timestamp to be recorded as the workflow finish
-
def
workflowStart(piID: KeyT, time: Long): Unit
Handles the event of a workflow starting, updating its metrics accordingly.
Handles the event of a workflow starting, updating its metrics accordingly.
- piID
the ID of the workflow
- time
the timestamp to be recorded as the workflow start
-
def
→[B](y: B): (MetricsAggregator[KeyT], B)
- Implicit
- This member is added by an implicit conversion from MetricsAggregator[KeyT] to ArrowAssoc[MetricsAggregator[KeyT]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc