Karm / mandrel-integration-tests

Integration tests for GraalVM and its Mandrel distribution. Runs Quarkus, Helidon and Micronaut applications and small targeted reproducers. The focus is solely on native-image utility and compilation of Java applications into native executables.
Apache License 2.0
5 stars 3 forks source link

[WIP] Reports build perf of a Q app to https://github.com/Karm/collector #96

Closed Karm closed 1 year ago

Karm commented 2 years ago

It works, results already available at the stage collector:

$ curl -s -X GET -H "Accept: application/json" -H "token:${TR}" https://stage-collector.foci.life/api/report/time-and-size | jq
[
  {
    "id": 2002,
    "arch": "amd64",
    "buildTimeS": 187,
    "classes": 26773,
    "classesForJNIAccess": 69,
    "classesForReflection": 1448,
    "classesReachable": 24598,
    "created": "2022-05-27T20:56:18.014",
    "executableSizeMB": 112,
    "fields": 63838,
    "fieldsForJNIAccess": 90,
    "fieldsForReflection": 1565,
    "fieldsReachable": 44762,
    "jdkVersion": "11.0.15+10",
    "mandrelVersion": "22.1.0.0-Final",
    "methods": 225077,
    "methodsForJNIAccess": 54,
    "methodsForReflection": 11226,
    "methodsReachable": 137824,
    "nativeImageXmXMB": 10240,
    "numberOfGC": 85,
    "os": "CentOS 8",
    "peakRSSMB": 7178,
    "quarkusVersion": "2.8.3.Final",
    "ramAvailableMB": 12478,
    "runnerDescription": "Local",
    "testApp": "https://github.com/Karm/dev-null/tree/issue-25672-1.0.0/issue-25672",
    "timeInGCS": 26
  },
  {
    "id": 2003,
    "arch": "amd64",
    "buildTimeS": 135,
    "classes": 27182,
    "classesForJNIAccess": 66,
    "classesForReflection": 1496,
    "classesReachable": 25017,
    "created": "2022-05-27T21:26:22.214",
    "executableSizeMB": 107,
    "fields": 65505,
    "fieldsForJNIAccess": 77,
    "fieldsForReflection": 1665,
    "fieldsReachable": 42156,
    "jdkVersion": "17.0.4-beta+2-202205122322",
    "mandrelVersion": "22.2.0-dev6fccf39aa33",
    "methods": 219309,
    "methodsForJNIAccess": 56,
    "methodsForReflection": 11473,
    "methodsReachable": 128247,
    "nativeImageXmXMB": 10240,
    "numberOfGC": 70,
    "os": "CentOS 8",
    "peakRSSMB": 6420,
    "quarkusVersion": "2.8.3.Final",
    "ramAvailableMB": 11940,
    "runnerDescription": "Local",
    "testApp": "https://github.com/Karm/dev-null/tree/issue-25672-1.0.0/issue-25672",
    "timeInGCS": 10
  }
]

TS started as:

$  mvn  clean verify \
-Ptestsuite \
-DexcludeTags=all \
-DincludeTags=perfcheck \
-Dperf.app.dir=/home/karm/workspaceRH/dev-null/issue-25672 \
-Dperf.app.arch=amd64 \
-Dperf.app.os="CentOS 8" \
-Dperf.app.xmxmb=10240 \
-Dperf.app.runner.description=Local \
-Dperf.app.url="https://github.com/Karm/dev-null/tree/issue-25672-1.0.0/issue-25672" \
-Dquarkus.version=2.8.3.Final \
-Dperf.app.secret.token=${TW} \
-Dperf.app.endpoint=https://stage-collector.foci.life/api/report/time-and-size

Additional polishing required, WIP....

Karm commented 2 years ago

I am running it in a Jenkins matrix job, each cell sending a report. Those magic numbers being quarkus.native.native-image-xmx in MB.

Jenkins POC

image

Data

And the collector seems to be working as expected. Excerpt:

image

Karm commented 2 years ago

@jerboaa Until there is some consensus on the JSON output for the build info, I stitched together this sort of parser for the log format.

I think if we could come up with a dead simple TreeMap of at least rudimentary data that we could serialize to JSON as I do here, we might be able to backport to 21.3.x without too much pain too. It would enable us to compare with older versions too...

jerboaa commented 2 years ago

@Karm Hmm, build output parsing is even more fragile than the ugly hack I did originally in an early incarnation of https://github.com/oracle/graal/pull/4481 :-) Have you had a look at this patch? I think the more viable approach should be to use the produced json file from that patch. I think this will be the only thing which will stay for an integrateable patch of this sort. I'm not sure if supporting older versions is very high up on the priority list. Anyway, we should talk to get this combined with what I have.

Karm commented 2 years ago

This won't get merged in this form. I will be changing the JSON format to what @jerboaa is producing in https://github.com/oracle/graal/pull/4481.

Karm commented 1 year ago

Closing as all version we need to track support JSON reporting now.