Links for the talk given at DPE Summit 2023: "Unlocking build analytics: Getting started with the Gradle Enterprise API"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.file.FileSystems | |
develocity { | |
buildScan { | |
background { | |
FileSystems.getDefault().getFileStores().forEach { | |
value("Free space: ${it.name()}", "${it.usableSpace}/${it.totalSpace}") | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fingerprinter = services.get(org.gradle.internal.fingerprint.classpath.ClasspathFingerprinter) | |
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach { task -> | |
def objectFactory = task.project.objects | |
def buildScan = rootProject.buildScan | |
doFirst { | |
ClassLoader classLoader = task.getClass().classLoader | |
while (classLoader instanceof URLClassLoader) { | |
def fingerprints = [] as Set | |
def allFiles = [] as Set | |
classLoader.getURLs().each { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Have gpg fetch key password using 1Password CLI. | |
# | |
# 1. Add to ~/.gnupg/gpg-agent.conf: | |
# | |
# pinentry-program <path to this file> | |
# | |
# 2. Export OP_GPG_PASSWORD_ENTRY_<key-id>=<key-password-reference> variables : | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
''' | |
Downloads requested assets based on a JSON file that lists a directory tree. | |
USAGE: | |
./download-deec-assets.py --json-file deec-assets.json --dir-name '[E2]Eletronica_2' | |
# or | |
./download-deec-assets.py --json-file deec-assets.json --dir-id '0fx80' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.json.JsonSlurper | |
import static java.nio.charset.Charset.defaultCharset | |
import static java.util.concurrent.TimeUnit.SECONDS | |
// Captures build and environment data and stores it in build scans via custom tags, links, | |
// and values, for one-off and trend analyses. | |
gradleEnterprise { | |
buildScan { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# pylint: disable=missing-function-docstring,invalid-name | |
""" | |
Adds relative symlinks in the given directory, pointing to the specified | |
files in the current directory. | |
For example, add symlinks to a nested Gradle build in order to open in | |
separately in an IntelliJ IDE: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Randomizes the cache path so that builds always miss and push cache entries | |
// to the remote cache. Used to benchmark upload performance when making changes | |
// to a Develocity instance. Configuration cache must be disabled so that | |
// a random path is never re-used. | |
settingsEvaluated { settings -> | |
settings.with { | |
// This impl will only work with the Develocity build cache type | |
assert buildCache.remote.class.name.contains('com.gradle.develocity') | |
buildCache.remote.path = "cache/${UUID.randomUUID()}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/wg/wrk | |
https://github.com/loadimpact/k6 | |
https://github.com/tsenart/vegeta | |
https://github.com/rakyll/hey | |
https://github.com/ddosify/ddosify | |
https://github.com/mcollina/autocannon | |
https://github.com/codesenberg/bombardier | |
https://github.com/hatoo/oha | |
https://github.com/giltene/wrk2 | |
https://github.com/six-ddc/plow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Small script to build a changelog file out of past GitHub releases. | |
# | |
# USAGE: ./releases-to-changelog.py <github-repo-path> | |
# Example: ./releases-to-changelog.py "JetBrains/kotlin" > CHANGELOG.md | |
from subprocess import check_output | |
import sys | |
import json |
NewerOlder