Skip to content

Instantly share code, notes, and snippets.

@cdsap
cdsap / request.sh
Created March 7, 2025 01:46
Get Modules executed in a set Of builds
curl --location -G 'https://$DV_URL/api/builds?maxBuilds=50&models=gradle-build-cache-performance&reverse=true' --header "Authorization: Bearer $TOKEN" --data-urlencode 'query=project:nowinandroid_test gradle.requestedTasks:assembleDebug'
$RESPONSE | jq '[.[]
| {
id: .models.gradleBuildCachePerformance.model.id,
buildDuration: .models.gradleBuildCachePerformance.model.buildTime,
modules: (
(.models.gradleBuildCachePerformance.model.taskExecution // [])
| map(select(.taskType=="org.jetbrains.kotlin.gradle.tasks.KotlinCompile" and .avoidanceOutcome=="executed_cacheable")
| (.taskPath // "") | split(":")[:-1] | join(":")
@cdsap
cdsap / monitor.sh
Created March 25, 2025 20:32
JVM Memory process monitor
#!/bin/bash
PATTERNS=("GradleDaemon" "KotlinCompileDaemon" "GradleWorkerMain")
LOG_FILE="java_mem_monitor.log"
INTERVAL=5
echo "Starting memory monitor at $(date)" > "$LOG_FILE"
echo "Timestamp | PID | Name | Heap_Used_MB | Heap_Capacity_MB | RSS_MB" >> "$LOG_FILE"
while true; do