Giter Club home page Giter Club logo

talaiot's Introduction

Talaiot

CircleCI

Talaiot is an extensible library targeting teams using the Gradle Build System. It records build/task duration helping to understand problems of the build and detecting bottlenecks. For every record, it will add additional information defined by default or custom metrics.

Talaiot is compatible with different systems like InfluxDb, Elasticsearch or RethinkDb. You need to use a Plugin to work with Talaiot. You can use the standard plugin, including all the functionality, or if you have a specific requirement with a individual plugin.

Current available plugins:

Plugin Description
standard Contains all the available publishers listed below
base Talaiot core functionality with Json, Output and Timeline publishers
elasticsearch Talaiot core functionality with Elasticsearch publisher
influxdb Talaiot core functionality with Influxdb publisher
influxdb2 Talaiot core functionality with Influxdb2 (Flux) publisher
pushgateway Talaiot core functionality with Pushgateway publisher
rethinkdb Talaiot core functionality with Rethinkdb publisher

Once you have Talaiot integrated you can create dashboards using the build information stored:

What is Talaiot?

"... while some certainly had a defensive purpose, the use of others is not clearly understood. Some believe them to have served the purpose of lookout or signalling towers..."

https://en.wikipedia.org/wiki/Talaiot

Table of Contents

  1. Setup
  2. Snapshots
  3. Talaiot Extension
  4. Samples
  5. Example: Analyzing Data provided by Talaiot
  6. Other Existing Libraries
  7. Articles
  8. Contributing
  9. Contributors
  10. Thanks

Setup

Standard Plugin

Kotlin

Using the plugins DSL:

plugins {
  id("io.github.cdsap.talaiot") version "<latest version>"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("io.github.cdsap:talaiot:<latest version>")
  }
}

apply(plugin = "io.github.cdsap.talaiot")

Groovy

Using the plugins DSL:

plugins {
  id "io.github.cdsap.talaiot" version "<latest version>"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "io.github.cdsap:talaiot:<latest version>"
  }
}

apply plugin: "io.github.cdsap.talaiot"

Individual Plugins

Each plugin is deployed to the Gradle Plugin Portal using thee following convention:

Plugin Id
base io.github.cdsap.talaiot.plugin.base
elasticsearch io.github.cdsap.talaiot.plugin.elasticsearch
influxdb io.github.cdsap.talaiot.plugin.influxdb
pushgateway io.github.cdsap.talaiot.plugin.pushgateway
rethinkdb io.github.cdsap.talaiot.plugin.rehinkdb

Kotlin Example Plugin

Using the plugins DSL:

plugins {
  id("io.github.cdsap.talaiot.plugin.base") version "<latest version>"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("io.github.cdsap.talaiot.plugin:base:<latest version>")
  }
}

apply(plugin = "io.github.cdsap.talaiot.plugin.base")

Groovy

Using the plugins DSL:

plugins {
  id "io.github.cdsap.talaiot.plugin.base" version "<latest version>"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "io.github.cdsap.talaiot.plugin:base:<latest version>"
  }
}

apply plugin: "io.github.cdsap.talaiot.plugin.base"

Snapshots

maven ( url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") )

Standard Plugin

classpath("io.github.cdsap:talaiot:<latest version>-SNAPSHOT")

Individual Plugin

classpath("io.github.cdsap.talaiot.plugin:base:<latest version>-SNAPSHOT")

Talaiot Extension

Property Description
logger Mode for logging (Silent,Info)
ignoreWhen Configuration to ignore the execution of Talaiot
generateBuildId Generation of unique identifier for each execution(disabled by default)
publishers Configuration to define where to submit the information of the build
metrics Additional information tracked during the execution of the task
filter Rules to filter the build or the tasks to be reported

Metrics

We can include extra information on the build and task tracked data during the build. This information will be added to the default metrics defined.

talaiot {
    metrics {
        // You can add your own custom Metric objects:
        customMetrics(
            MyCustomMetric(),
            // Including some of the provided metrics, individually.
            HostnameMetric()
        )

        // Or define build or task metrics directly:
        customBuildMetrics(
            "kotlinVersion" to $kotlinVersion,
            "javaVersion" to $javaVersion
        )
        customTaskMetrics(
            "customProperty" to $value
        )
    }
}

Read more about it in the Metrics wiki page.

Filters

For every measurement done, Talaiot can filter the tasks tracked to be published.

Property Description
tasks Configuration used to filter which tasks we want to exclude and include in the execution
module Configuration used to filter which modules we want to exclude and include in the execution
threshold Configuration used to define time execution ranges to filter tasks to be reported

For every measurement done, Talaiot can completely skip publishing process. These filters affect all publishers:

Property Description
build.success Configuration used to skip publishing based on build success.
build.requestedTasks Configuration used to skip publishing based on what was the requested task.

Example:

 filter {
     tasks {
         excludes = arrayOf("preDebugBuild", "processDebugResources")
     }
     modules {
         excludes = arrayOf(":app")
     }
     threshold {
         minExecutionTime = 10
     }
     build {
         success = true
         requestedTasks {
             includes = arrayOf(":app:assemble.*")
             excludes = arrayOf(":app:generate.*")
         }
     }
 }

IgnoreWhen

Property Description
envName Name of the Property
envValue Value of the Property

We will use IgnoreWhen when we want to ignore publishing the results of the build. One use case is to ignore it when we are building on CI:

talaiot {
    ignoreWhen {
        envName = "CI"
        envValue = "true"
    }
}

Publishers configuration

The Publisher configuration will change depending on the type of plugin you are using. Standard Plugin provides all the different publisher configurations, for example:

talaiot {
    publishers {
        influxDbPublisher {
            dbName = "tracking"
            url = "http://localhost:8086"
            taskMetricName = "task"
            buildMetricName = "build"
        }

    }
    filter {
        threshold {
            minExecutionTime = 10
        }
    }
}

This configuration would be valid for the InfluxDb Plugin.

InfluxDbPublisher

Talaiot will send to the InfluxDb server defined in the configuration the values collected during the execution

Property Description
dbName Name of the database
url Url of the InfluxDb Server
taskMetricName Name of the metric used for specific task in the execution
buildMetricName Name of the metric used for the overall information of the build in the execution
username username which is used to authorize against the influxDB instance (optional)
password password for the username which is used to authorize against the influxDB (optional)
retentionPolicyConfiguration retention policy which is used for writing points
publishBuildMetrics Publish build metrics of the publisher, true by default
publishTaskMetrics Publish tasks metrics of the publisher, true by default
buildTags Collection of BuildMetrics used as tags
taskTags Collection of TaskMetrics used as tags

For complete list of

If you need to include custom metrics as tags, you need to use the type Custom

Included in: io.github.cdsap.talaiot and io.github.cdsap.talaiot.plugin.influxdb plugins.

InfluxDb2Publisher

Talaiot will send to the InfluxDb (Flux) server defined in the configuration the values collected during the execution

Property Description
token Influx access token
url Url of the InfluxDb Server
taskMetricName Name of the metric used for specific task in the execution
buildMetricName Name of the metric used for the overall information of the build in the execution
org Organization name
bucket Name of bucket
publishBuildMetrics Publish build metrics of the publisher, true by default
publishTaskMetrics Publish tasks metrics of the publisher, true by default
buildTags Collection of BuildMetrics used as tags
taskTags Collection of TaskMetrics used as tags

Included in: io.github.cdsap.talaiot and io.github.cdsap.talaiot.plugin.influxdb2 plugins.

RetentionPolicyConfiguration

Retention Policy (RP) describes how long InfluxDB keeps data, how many copies of the data to store in the cluster, and the time range covered by shard groups. RPs are unique per database and along with the measurement and tag set define a series. Since version 1.0.0 we are including by default RP in all the operations included in the publisher. The RetentionPolicyConfiguration includes:

Property Description
name name of the retentionPolicy(rp). Default rpTalaiot
duration duration of the rp. Default 30d
shardDuration the shardDuration. Default 30m
replicationFactor the replicationFactor of the rp. Default 2
isDefault if the rp is the default rp for the database or not. Default false

Example of custom RP Configuration:

influxDbPublisher {
  dbName = "xxxxxx"
  url = "xxxxxx"
  retentionPolicyConfiguration {
    name = "customRp"
    duration = "4w"
    shardDuration = "30m"
    replicationFactor = 1
    isDefault = true
  }
}

PushGatewayPublisher

Talaiot will send to the PushGateway server defined in the configuration the values collected during the execution.

Property Description
url Url of the PushGateway Server
taskJobName Name of the job required for the tasks metrics to be exported to Prometheus
buildJobName Name of the job required for the build metrics to be exported to Prometheus
publishBuildMetrics Publish build metrics of the publisher, true by default
publishTaskMetrics Publish tasks metrics of the publisher, true by default

Included in: io.github.cdsap.talaiot and io.github.cdsap.talaiot.plugin.pushgateway plugins.

JsonPublisher

Talaiot will Publish the results of the build with a json format .

    publishers {
        jsonPublisher = true

    }

Included in: io.github.cdsap.talaiot and io.github.cdsap.talaiot.plugin.base plugins.

ElasticSearchPublisher

Talaiot will send to the ElasticSearch server defined in the configuration the values collected for tasks and build metrics during the execution in the different workers.

Property Description
url ElasticSearch server
taskIndexName Name for the index used to report tasks metrics
buildIndexName Name for the index used to report build metrics
publishBuildMetrics Publish build metrics of the publisher, true by default
publishTaskMetrics Publish tasks metrics of the publisher, true by default

Example:

    publishers {
        elasticSearchPublisher {
          url = "http://localhost:9200"
          taskIndexName = "task"
          buildIndexName = "build"
        }
    }

Included in: io.github.cdsap.talaiot and io.github.cdsap.talaiot.plugin.elasticsearch plugins.

HybridPublisher

This Publisher allows composition over publishers to report tasks and build metrics.

Property Description
taskPublisher Publisher configuration used to publish tasks metrics
buildPublisher Publisher configuration used to publish build metrics

Example:

    publishers {
        hybridPublisher {
            taskPublisher = ElasticSearchPublisherConfiguration().apply {
                url = "http://localhost:9200"
                buildIndexName = "build"
                taskIndexName = "task"
            }

            buildPublisher = InfluxDbPublisherConfiguration().apply {
                dbName = "tracking"
                url = "http://localhost:8086"
                buildMetricName = "build"
                taskMetricName = "task"
            }
        }
    }

In this example we are using InfluxDbPublisher to report build metrics and ElasticSearchPublisher to report task metrics.

Included in: io.github.cdsap.talaiot plugin.

RethinkDbPublisher

Talaiot will send to the RethinkDb server defined in the configuration the values collected during the execution

Property Description
dbName Name of the database
url Url of the RethinkDb Server
taskTableName Name of the table used to track tasks information
buildTableName Name of the table used to track the build information
username username which is used to authorize against the RethinkDb instance (optional)
password password for the username which is used to authorize against the RethinkDb (optional)
publishBuildMetrics Publish build metrics of the publisher, true by default
publishTaskMetrics Publish tasks metrics of the publisher, true by default

Included in: io.github.cdsap.talaiot and io.github.cdsap.talaiot.plugin.rethinkdb plugins.

Custom Publishers

Talaiot allows using custom publishers defined by the requirements of your environment, in case you are using another implementation.

talaiot {
    publishers {
        // You can define one or more custom publishers:
        customPublishers(
            MyCustomPublisher()
        )
    }
}

Read more about it in the Publishers wiki page In you are not using additional plugins we recommend to use io.github.cdsap.talaiot.plugin.base.

Sample

Folder sample contains a Gradle project using Talaiot:

cd sample
./gradlew assemble

The project includes examples creating custom publishers, defining metrics using different publishers.

Example: Analyzing Data provided by Talaiot

Docker, InfluxDb and Grafana

To have a quick setup to see the possibilities of Talaiot we are providing a Docker image to setup a Grafana + InfluxDb instances(based on this great repo).

Additionally, the Docker image is creating a default database, a provisioned dashboard and the default datasource for InfluxDb. The source is here:

To run the Docker Image:

docker run -d \
  -p 3003:3003 \
  -p 3004:8083 \
  -p 8086:8086 \
  -p 22022:22 \
  -v /var/lib/influxdb \
  -v /var/lib/grafana \
  cdsap/talaiot:latest

You can access to the local instance of Grafana:

http://localhost:3003 root/root

Populating data

If you access to the provisioned Dashboards included in the Docker Image(http://localhost:3003/d/F9jppxQiz/android-task-tracking?orgId=1 and http://localhost:3003/d/WlpZEBRMz/task-cache-info?orgId=1), you will see an empty dashboard like:

To see Talaiot in action, you need to populate the data. We are providing a script to populate data based in the sample project included in the repository. You can execute the script:

bash scripts/populate.sh

The script will download the repository and with the help of Gradle Profiler(https://github.com/gradle/gradle-profiler) will trigger number of builds defined in the scenario file:

assemble {
  tasks = ["clean"]
}
clean_build {
  versions = ["5.1"]
  tasks = ["assemble"]
  gradle-args = ["--parallel"]
  cleanup-tasks = ["clean"]
  run-using = cli
  warm-ups = 20
}

Once is finished you can check the results on the Grafana Dashboard http://localhost:3003/d/F9jppxQiz/android-task-tracking?orgId=1:

Additionally, we have included a new Dashboard to show how to work with the Caching information of the task execution:

http://localhost:3003/d/WlpZEBRMz/task-cache-info?orgId=1

Other Existing Libraries

Talaiot is not a new idea. There are multiple awesome plugins to use to achieve same results:

  • Build Time Tracker by Pascal Hartig(@passy).

  • Kuronometer Plugin developed with Scala and FP concepts by Pedro Vicente Gómez Sánchez(@pedrovgs)

Articles

🇹🇭 มาทำความรู้จักกับโปรเจค Android ของเราให้มากขึ้นดีกว่า (part 2) by Kajornsak P.

Metrics Configuration by Svyatoslav Chatchenko

Understanding Talaiot

Exploring the InfluxDbPublisher in Talaiot

Graphs, Gradle and Talaiot

Talaiot at Scale

Contributing

Talaiot is Open Source and accepts contributions of new Publishers, Metrics and Dashboards that we can include as provisioned ones in the Docker image. With the new Plugin structure you can create your own plugins, feel free to contribute with new plugins or if you want to use your own repo drop us comment to include it in a community plugins.

Contributors

Thanks

Pascal Hartig, Build Time Tracker it was an inspiration to build this plugin.

Kohttp Library

Graphviz-java Library

Orchid

talaiot's People

Contributors

bhargavms avatar cdsap avatar cristiangreco avatar jan-stoltman-bolt avatar malinskiy avatar marinashaposhnikova avatar mokkun avatar mydogtom avatar notsatyarth avatar rybalkinsd avatar smecsia avatar snpefk avatar tagantroy avatar tinder-inakivillar avatar vacxe avatar vipsy avatar wzieba avatar yarolegovich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

talaiot's Issues

Publishing to prometheus pushgateway fails with Bad Request

Publishing to prometheus pushgateway fails with Bad Request
It is not printing HTTP response code either. There should be more info in the logs to debug.

Output:

================
PushGatewayPublisher
publishBuildMetrics: true
publishTaskMetrics: false
================
http://prometheus-pushgateway:9091/metrics/job/task
== Build Time Summary ==
Bad Request

Here is my configuration

    talaiot {
        logger = com.cdsap.talaiot.logger.LogTracker.Mode.INFO
        publishers {
            pushGatewayPublisher {
                url = "http://prometheus-pushgateway:9091"
                publishBuildMetrics = true
                publishTaskMetrics = false
            }
        }

        filter {
            threshold {
                minExecutionTime = 1000
            }
        }
    }

A direct curl call works and pushes the metrics.
"some_metric 3.14" | curl --data-binary @- http://prometheus-pushgateway:9091/metrics/job/some_job -v

OutputPublisher is not showing the output correctly

No shrug:

================
OutputPublisher
================
 :app:preBuild : 0 ms
 :app:generateDebugResources : 0 ms
 :app:generateDebugSources : 0 ms
 :app:compileDebugSources : 0 ms
 :app:generateDebugAssets : 0 ms
 :app:processDebugJavaRes : 0 ms
 :app:assembleDebug : 0 ms
 :clean : 1 ms
 :app:compileDebugAidl : 1 ms
 :app:checkDebugManifest : 1 ms

A connection to (http://myserver.ru/) was leaked.

Hello, I have follow error.

A connection to http://myserver.ru/ was leaked. Did you forget to close a response body? java.lang.Throwable: response.body().close() at okhttp3.internal.platform.Platform.getStackTraceForCloseable(Platform.java:148) at okhttp3.RealCall.captureCallStackTrace(RealCall.java:115) at okhttp3.RealCall.execute(RealCall.java:87) at io.github.rybalkinsd.kohttp.dsl.HttpPostDslKt.httpPost(HttpPostDsl.kt:48) at io.github.rybalkinsd.kohttp.dsl.HttpPostDslKt.httpPost$default(HttpPostDsl.kt:46) at com.cdsap.talaiot.request.SimpleRequest.send(SimpleRequest.kt:20) at com.cdsap.talaiot.publisher.InfluxDbPublisher$publish$2.run(InfluxDbPublisher.kt:55) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Docker Hub Deployment

There is not possible to deploy with docker.hub due an error with the paths

Step 18/31 : COPY supervisord/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY failed: stat /var/lib/docker/tmp/docker-builder097208477/supervisord/supervisord.conf: no such file or directory

InfluxDBException: retention policy not found: rpTalaiot

On a clean installation of InfluxDb the first time we try to report metrics we have this error:

Exception in thread "pool-4-thread-1" org.influxdb.InfluxDBException: retention policy not found: rpTalaiot at 

org.influxdb.InfluxDBException.buildExceptionFromErrorMessage(InfluxDBException.java:161) 

Once you change dbname it works.

Add Promotheus Dashboard

Add new Dashboard for Prometheus and update the publisher to fit requirements of release 1.0.0

Build fails if not able to sent the metrics

Exception in thread “pool-5-thread-1” org.influxdb.InfluxDBException: partial write: max-series-per-database limit exceeded: (1000000) dropped=2955
    at org.influxdb.InfluxDBException.buildExceptionFromErrorMessage(InfluxDBException.java:161)
    at org.influxdb.InfluxDBException.buildExceptionForErrorState(InfluxDBException.java:173)
    at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:808)
    at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:463)
    at com.cdsap.talaiot.publisher.InfluxDbPublisher$publish$1.run(InfluxDbPublisher.kt:74)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Empty configuration for InfluxDb

If we are setting properties for the configuration of InfluxDbPublisher throws a non-descriptive error

Failed to notify build listener.
> java.lang.reflect.UndeclaredThrowableException (no error message)
> java.lang.reflect.UndeclaredThrowableException (no error message)

Problem with RetentionPolicyConfiguration

I checked https://github.com/cdsap/Talaiot/blob/master/talaiot/src/main/kotlin/com/cdsap/talaiot/configuration/InfluxDbPublisherConfiguration.kt
it looks like RetentionPolicyConfiguration is not correct and all fields should be vars instead of vals.
I tried to set a custom retention policy

talaiot {
    publishers {
        influxDbPublisher {
            dbName = "xxxxxx"
            url = "xxxxxx"
            username = "xxxxxx"
            password = "xxxxxx"
            taskMetricName = "task"
            buildMetricName = "build"
            retentionPolicyConfiguration {
                name = "rpTalaiot"
                duration = "4w"
                shardDuration = "30m"
                replicationFactor = 1
                isDefault = true
            }
        }
    }
}

and build failing with

> Could not find method retentionPolicyConfiguration() for arguments [build_duu1x1uzp5fcat966lugpczfc$_run_closure1$_closure4$_closure6$_closure7@443375b6] on object of type com.cdsap.talaiot.TalaiotExtension.

Ktor Dependency

Talaiot requires Ktor, but the dependency is not solved.
we need to use

url "https://dl.bintray.com/kotlin/ktor"

Duplicated rootNode

Seen since version 0.1.16 we can see in the OutputPlublisher the rootNode duplicated

¯\_(ツ) compileKotlin: 30sec : EXECUTED 
¯\_(ツ)_/¯ ¯\_(ツ)_/¯ ¯\_(ツ)_/¯ ¯\_(ツ)_/¯ ¯\_(ツ)_/ assembleDebug: 3min : EXECUTED 
¯\_(ツ)_/¯ ¯\_(ツ)_/¯ ¯\_(ツ)_/¯ ¯\_(ツ)_/¯ ¯\_(ツ)_/¯ assembleDebug: 3min : EXECUTED 

Convert Threshold be included it as Filter

As @Satyarths mentioned in the PR #54 Threshold should be included in the Filtering configuration

Ideal DSL would be

 filter{
       threshold {
          minExecutionTime = 10
       }
       tasks{
           includes = arrayOf("cle.*")
           excludes = arrayOf("taskA")
        }
       modules{
           includes = arrayOf("feature.*")
           excludes = arrayOf("utils.*")
        }
      }

Android Studio gradle sync cause a problem with requestedTasks

When you run Gradle sync in AndroidStudio you will see a very long line of requested tasks(in our case it is 10k characters). It contains a lot of generateDebugSources tasks for each module in the project. As a workaround, we can check tasks names
diff.txt
Reproduce:

  1. Open Android Studio
  2. Click sync now

Software visualisation

Hi,
I believe there is a need for software visualisation tools to support the understanding of software systems. Many software visualisation tools, both open source and commercial, have been created for many languages, but no software visualisation tool has been created for the language Kotlin.

I have now however created one for my Bachelor thesis. I have used my application to visualise your project, and it shows the complexity of the project. The idea is the bigger the class or function, the more complex it is.
Billede 06-05-2019 kl  11 54-1
If you could answer a few question for me, that would be very helpful!

To get started, can you tell me briefly about yourself?

a) What is your current occupation?
b) What about your programming background?
Do you use software visualisation tools to support tasks?
a) When was the last time you used these tools?
b) Please describe your experience with these tools.
Have you learned anything new from looking at this visualisation?
a) What did you learn?
b) Was it valuable?
Suggestions for improvement
Your help would really be appreciated.
Best,
Ashwin

Default Grafana change

Question: Is it possible and would it be handy to modify dashboard/graphs to see any task from gradle build run?

It is nice to see graphs for the requested tasks. But would be great also to see other tasks graphs.

Allow setting a threshold for the minimum task Execution Time

Hi there,

I was wondering if would be possible to add a threshold value for tasks whose output should be uploaded. I'm running this on a project which generates ~2200 tasks, and a lot of them take <10ms. This makes the string content to uploaded quite huge. So looking at some way of reducing it.

This would be something similar to that implemented in the build-time-tracker-plugin

java.util.NoSuchElementException during gradle sync

When I sync my project, I get NoSuchElementException. After some search for the cause, I found that in the TalaiotListener in the projectsEvaluated method, property gradle.startParameter.taskRequests was empty. Because of this, a crash occurs in the talaiotTracker.initNodeArgument () method.

Stacktrace:

java.util.NoSuchElementException
at com.cdsap.talaiot.TalaiotTracker.initNodeArgument(TalaiotTracker.kt:16)
at com.cdsap.talaiot.TalaiotListener.projectsEvaluated(TalaiotListener.kt:41)
at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingInvocationHandler$1$1.run(DefaultListenerBuildOperationDecorator.java:240)
at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.reapply(DefaultUserCodeApplicationContext.java:58)
at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingInvocationHandler$1.run(DefaultListenerBuildOperationDecorator.java:236)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingInvocationHandler.invoke(DefaultListenerBuildOperationDecorator.java:233)
at com.sun.proxy.$Proxy72.projectsEvaluated(Unknown Source)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
at org.gradle.internal.event.DefaultListenerManager$ListenerDetails.dispatch(DefaultListenerManager.java:376)
at org.gradle.internal.event.DefaultListenerManager$ListenerDetails.dispatch(DefaultListenerManager.java:358)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
at org.gradle.internal.event.DefaultListenerManager$EventBroadcast$ListenerDispatch.dispatch(DefaultListenerManager.java:346)
at org.gradle.internal.event.DefaultListenerManager$EventBroadcast$ListenerDispatch.dispatch(DefaultListenerManager.java:333)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:230)
at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:149)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:324)
at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:234)
at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:140)
at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy13.projectsEvaluated(Unknown Source)
at org.gradle.initialization.DefaultGradleLauncher$NotifyProjectsEvaluatedListeners.run(DefaultGradleLauncher.java:407)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.initialization.DefaultGradleLauncher.projectsEvaluated(DefaultGradleLauncher.java:428)
at org.gradle.initialization.DefaultGradleLauncher.access$1400(DefaultGradleLauncher.java:50)
at org.gradle.initialization.DefaultGradleLauncher$ConfigureBuild.run(DefaultGradleLauncher.java:305)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.initialization.DefaultGradleLauncher.configureBuild(DefaultGradleLauncher.java:210)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:134)
at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:58)
at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:55)
at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.java:82)
at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.java:75)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:183)
at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:40)
at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:75)
at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:55)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:58)
at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:39)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:51)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:45)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:45)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:49)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:46)
at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:78)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:46)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:31)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:42)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:28)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:78)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:52)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:59)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:36)
at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:68)
at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:38)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:37)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:26)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:60)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:32)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:55)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:41)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:48)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:32)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:62)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:81)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:295)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)

Add config for metrics submission

On our big project, we have a lot of tasks and if we report all of them our Influxdb cannot handle this amount of data. It would be great to have an option to disable task metric submission and report only build metric.

pushgateway publisher fails when module name contains "-"

When adding a module named test-module to an app, it fails to parse the data properly.

[SimpleRequest]: send request to http://localhost:9091/metrics/job/task
[SimpleRequest]: Response code 400
[SimpleRequest]: Response code not Successful
[SimpleRequest]: Message Response Bad Request
[SimpleRequest]: Response Body text format parsing error in line 12: expected float as value, got "-module:generateDebugBuildConfig{state=\"UP_TO_DATE\",module=\":test-module\",rootNode=\"false\""

it can send build metrics but fails in task metrics.

CustomPublisherConfiguration for Publishers

Abstract the creation of CustomPublishers with a configuration like:

class CustomPublisherConfiguration : PublisherConfiguration {
    override var name = "CustomPublisherConfiguration"
    override var publishBuildMetrics = true
    override var publishTaskMetrics = true
    val publisher: Publisher? = null
} 

This will help us to include custom publishers in the HybridPublisher and have a better syntax in the main publisher configuration

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.