TalaiotTracker

In package com.cdsap.talaiot

class com.cdsap.talaiot.TalaiotTracker

Tracker of executed tasks during the build It tracks duration, name, path, dependencies, task state and invoke mode(rootNode)

Fields

taskLengthList:

List of tasks executed during the build and tracked

var queue: ArrayDeque

Queue that represents the tasks used in the gradlew/gradle to start the build. We need to register these tasks because we want to aggregate the overall duration for these tasks.

Example: ./gradlew assembleDebug test will generate two items in the queue, once the TaskListener will inform about the assembleDebug, the duration is 0 and we want to aggregate the information for all the tasks dependent on assembleDebug.

var isTracking: Boolean

in cases where Gradle executes the default tasks we don't want to track the build

Constructors

constructor()

Tracker of executed tasks during the build It tracks duration, name, path, dependencies, task state and invoke mode(rootNode)

Parameters:
  • No parameters

Methods

fun initNodeArgument()

retrieve the element from the queue

Parameters:
  • No parameters
fun startTrackingTask(task: )

init the task tracked in the HashTable and increase the counter of the current node

Parameters:
  • task:
fun finishTrackingTask(task: , state: , workerName: String)

Compute the total time of the task and aggregate the rootNodes launched by the user. Clean is handled as exception, by default task name and task argument on general clean tasks are the same.

Parameters:
  • task:
  • state:
  • workerName: String