Hood
Hood is a Gradle
plugin to compare benchmarks and set the result as a Github
status for a Pull Request
.
Hood is built on Arrow, a Functional companion to Kotlin’s Standard Library.
Tasks
Hood has two tasks to compare benchmarks:
compareBenchmarks
: Compare two or more benchmarks and print the result.compareBenchmarksCI
: Compare two or more benchmarks and upload aGithub
status for aPull Request
.
and an extra task uploadBenchmarks
to upload Benchmarks files and keep them up to date.
Adding the Hood dependency
To add the Hood plugin dependency on Gradle, you can use:
Declarative syntax (especially recommended for the Kotlin DSL)
plugins {
id "com.47deg.hood" version "0.8.0"
}
plugins {
id("com.47deg.hood") version "0.8.0"
}
Don’t forget to add the pluginManagement
block at the top of your settings.gradle/.kts
if you are not able to find it:
pluginManagement {
repositories {
maven { url "https://dl.bintray.com/47deg/hood" }
gradlePluginPortal()
}
}
pluginManagement {
repositories {
maven("https://dl.bintray.com/47deg/hood")
gradlePluginPortal()
}
}
Imperative syntax
To use plugin through imperative syntax, you need to first add the dependency on the buildscript
:
buildscript {
repositories {
maven { url "https://dl.bintray.com/47deg/hood" }
}
dependencies {
classpath "com.47deg:hood:0.8.0"
}
}
buildscript {
repositories {
maven("https://dl.bintray.com/47deg/hood")
}
dependencies {
classpath("com.47deg:hood:0.8.0")
}
}
and then you will be able to add it with apply
:
apply plugin: "com.47deg.hood"
apply(plugin = "com.47deg.hood")
The visualizer companion
Hood has a companion called Robeen to show the benchmark comparison in a visual way.