From 341222d06daf7bb136cb9de4db3f4c6f507362bd Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Fri, 08 May 2026 00:12:25 +0000 Subject: [PATCH] ci: switch all benchmarks to realworld tests dir --- --- a/nix/benchmarks.nix +++ b/nix/benchmarks.nix @@ -2,7 +2,6 @@ lib, runCommand, stdenv, - fetchFromGitHub, fetchJrq, go-jsonnet, sjsonnet, @@ -16,16 +15,10 @@ let inherit (cpp-jsonnet) jsonnetBench; inherit (go-jsonnet) goJsonnetBench; - graalvmBench = fetchFromGitHub { - owner = "oracle"; - repo = "graal"; - rev = "bc305df3fe587960f7635f0185571500e5988475"; - hash = "sha256-4EKB1b2o4/qtYQ+nqbbs621OJrtjApsAWEBcw5EjrYc="; - }; realworldVendor = fetchJrq { name = "realworld-vendor"; lockfile = ../tests/realworld/jsonnetfile.lock.json; - vendorHash = "sha256-6tXi6bRw77YKB17PhSpJnVYQcsGOvB8sgjKIrFtrwfc="; + vendorHash = "sha256-oEUzM6Bhu8ZT8vCtYDbBEjG5BFHYpID+1/2pgXvIAgo="; }; realworldBench = runCommand "realworld-bench" { } '' mkdir -p $out @@ -172,42 +165,63 @@ ''} echo "== Real world" >> $out ${mkBench { - name = "Graalvm CI"; - path = "${graalvmBench}/ci.jsonnet"; - omitSource = true; - skipCpp = "takes longer than a hour"; + name = "GitLab runbooks dashboards"; + path = "${realworldBench}/entry-gitlab-runbooks.jsonnet"; + jpaths = [ + "${realworldBench}/vendor" + "${realworldBench}/vendor/runbooks/libsonnet" + "${realworldBench}/vendor/runbooks/dashboards" + "${realworldBench}/vendor/runbooks/services" + "${realworldBench}/vendor/runbooks/metrics-catalog" + ]; + skipCpp = "too slow, takes hours, skews results"; + skipGo = skipSlow; + }} + ${mkBench { + name = "GraalVM CI"; + path = "${realworldBench}/entry-graalvm.jsonnet"; + jpaths = [ + "${realworldBench}/vendor/graal" + ]; + skipCpp = "too slow, takes hours, skews results"; + skipGo = skipSlow; + }} + ${mkBench { + name = "Kube-prometheus"; + path = "${realworldBench}/entry-kube-prometheus.jsonnet"; + jpaths = [ + "${realworldBench}/vendor" + ]; + skipCpp = "too slow, takes hours, skews results"; skipGo = skipSlow; }} ${mkBench { name = "Loki manifests"; path = "${realworldBench}/entry-loki.jsonnet"; - jpaths = [ "${realworldBench}/vendor" ]; + jpaths = [ + "${realworldBench}/vendor" + "${realworldBench}" + ]; skipCpp = "too slow, takes hours, skews results"; skipGo = skipSlow; }} ${mkBench { name = "Mimir manifests"; path = "${realworldBench}/entry-mimir.jsonnet"; - jpaths = [ "${realworldBench}/vendor" ]; + jpaths = [ + "${realworldBench}/vendor" + "${realworldBench}" + ]; skipCpp = "too slow, takes hours, skews results"; skipGo = skipSlow; + skipScala = "https://github.com/databricks/sjsonnet/issues/829"; }} ${mkBench { name = "Tempo manifests"; path = "${realworldBench}/entry-tempo.jsonnet"; - jpaths = [ "${realworldBench}/vendor" ]; - skipCpp = "too slow, takes hours, skews results"; - skipGo = skipSlow; - }} - ${mkBench { - name = "GitLab runbooks dashboards"; - path = "${realworldBench}/entry-gitlab-runbooks.jsonnet"; jpaths = [ "${realworldBench}/vendor" - "${realworldBench}/vendor/runbooks/libsonnet" - "${realworldBench}/vendor/runbooks/dashboards" - "${realworldBench}/vendor/runbooks/services" - "${realworldBench}/vendor/runbooks/metrics-catalog" + "${realworldBench}" ]; skipCpp = "too slow, takes hours, skews results"; skipGo = skipSlow; --- a/nix/fetch-jrq.nix +++ b/nix/fetch-jrq.nix @@ -10,7 +10,7 @@ name ? "jrq-vendor", }: stdenvNoCC.mkDerivation (finalAttrs: { - inherit name; + name = "${name}-${builtins.substring 0 8 (builtins.hashFile "sha256" lockfile)}"; outputHashMode = "recursive"; outputHashAlgo = "sha256"; --- /dev/null +++ b/tests/realworld/entry-kube-prometheus.jsonnet @@ -0,0 +1 @@ +import 'kube-prometheus/main.libsonnet' -- gitstuff