Revise build reports and use HTML tables.

This commit is contained in:
Fabio Niephaus 2022-11-08 13:58:10 +01:00
parent b4ccf78d3d
commit bb71d9a37f
No known key found for this signature in database
GPG Key ID: F21CF5275F31DFD6
3 changed files with 448 additions and 109 deletions

153
dist/cleanup/index.js generated vendored
View File

@ -74118,6 +74118,7 @@ exports.generateReports = exports.setUpNativeImageBuildReports = void 0;
const c = __importStar(__nccwpck_require__(9042)); const c = __importStar(__nccwpck_require__(9042));
const core = __importStar(__nccwpck_require__(2186)); const core = __importStar(__nccwpck_require__(2186));
const fs = __importStar(__nccwpck_require__(7147)); const fs = __importStar(__nccwpck_require__(7147));
const github = __importStar(__nccwpck_require__(5438));
const path_1 = __nccwpck_require__(1017); const path_1 = __nccwpck_require__(1017);
const os_1 = __nccwpck_require__(2037); const os_1 = __nccwpck_require__(2037);
const utils_1 = __nccwpck_require__(1314); const utils_1 = __nccwpck_require__(1314);
@ -74191,6 +74192,7 @@ function setNativeImageOption(value) {
} }
} }
function createReport(data) { function createReport(data) {
const context = github.context;
const info = data.general_info; const info = data.general_info;
const analysis = data.analysis_results; const analysis = data.analysis_results;
const details = data.image_details; const details = data.image_details;
@ -74201,40 +74203,149 @@ function createReport(data) {
debugInfoBytes; debugInfoBytes;
let debugInfoLine = ''; let debugInfoLine = '';
if (details.debug_info) { if (details.debug_info) {
debugInfoLine = `\n| [Debug info](${DOCS_BASE}#glossary-debug-info) | ${bytesToHuman(debugInfoBytes)} | ${toPercent(debugInfoBytes, details.total_bytes)} | |`; debugInfoLine = `
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-debug-info" target="_blank">Debug info</a></td>
<td align="right">${bytesToHuman(debugInfoBytes)}</td>
<td align="right">${toPercent(debugInfoBytes, details.total_bytes)}</td>
<td align="left"></td>
</tr>`;
} }
const resources = data.resource_usage; const resources = data.resource_usage;
return `## Generated \`${info.name}\` return `## GraalVM Native Image Build Report
using [Native Image](https://www.graalvm.org/native-image/) from ${info.graalvm_version} (${info.java_version}). \`${info.name}\` generated as part of the '${context.job}' job in run <a href="${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}" target="_blank">#${context.runNumber}</a>.
#### Environment
<table>
<tr>
<td><a href="${DOCS_BASE}#glossary-version-info" target="_blank">GraalVM version</a></td>
<td>${info.graalvm_version}</td>
<td><a href="${DOCS_BASE}#glossary-ccompiler" target="_blank">C compiler</a></td>
<td>${info.c_compiler}</td>
</tr>
<tr>
<td><a href="${DOCS_BASE}#glossary-java-version-info" target="_blank">Java version</a></td>
<td>${info.java_version}</td>
<td><a href="${DOCS_BASE}#glossary-gc" target="_blank">Garbage collector</a></td>
<td>${info.garbage_collector}</td>
</tr>
</table>
#### Analysis Results #### Analysis Results
| Category | Types | in % | Fields | in % | Methods | in % | <table>
|:---------|------:|-----:|-------:|-----:|--------:|-----:| <thead>
| [Reachable](${DOCS_BASE}#glossary-reachability) | ${analysis.classes.reachable} | ${toPercent(analysis.classes.reachable, analysis.classes.total)} | ${analysis.fields.reachable} | ${toPercent(analysis.fields.reachable, analysis.fields.total)} | ${analysis.methods.reachable} | ${toPercent(analysis.methods.reachable, analysis.methods.total)} | <tr>
| [Reflection](${DOCS_BASE}#glossary-reflection-registrations) | ${analysis.classes.reflection} | ${toPercent(analysis.classes.reflection, analysis.classes.total)} | ${analysis.fields.reflection} | ${toPercent(analysis.fields.reflection, analysis.fields.total)} | ${analysis.methods.reflection} | ${toPercent(analysis.methods.reflection, analysis.methods.total)} | <th align="left">Category</th>
| [JNI](${DOCS_BASE}#glossary-jni-access-registrations) | ${analysis.classes.jni} | ${toPercent(analysis.classes.jni, analysis.classes.total)} | ${analysis.fields.jni} | ${toPercent(analysis.fields.jni, analysis.fields.total)} | ${analysis.methods.jni} | ${toPercent(analysis.methods.jni, analysis.methods.total)} | <th align="right">Types</th>
| [Loaded](${DOCS_BASE}#glossary-reachability) | ${analysis.classes.total} | 100.000% | ${analysis.fields.total} | 100.000% | ${analysis.methods.total} | 100.000% | <th align="right">in %</th>
<th align="right">Fields</th>
<th align="right">in %</th>
<th align="right">Methods</th>
<th align="right">in %</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-reachability" target="_blank">Reachable</a></td>
<td align="right">${analysis.classes.reachable}</td>
<td align="right">${toPercent(analysis.classes.reachable, analysis.classes.total)}</td>
<td align="right">${analysis.fields.reachable}</td>
<td align="right">${toPercent(analysis.fields.reachable, analysis.fields.total)}</td>
<td align="right">${analysis.methods.reachable}</td>
<td align="right">${toPercent(analysis.methods.reachable, analysis.methods.total)}</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-reflection-registrations" target="_blank">Reflection</a></td>
<td align="right">${analysis.classes.reflection}</td>
<td align="right">${toPercent(analysis.classes.reflection, analysis.classes.total)}</td>
<td align="right">${analysis.fields.reflection}</td>
<td align="right">${toPercent(analysis.fields.reflection, analysis.fields.total)}</td>
<td align="right">${analysis.methods.reflection}</td>
<td align="right">${toPercent(analysis.methods.reflection, analysis.methods.total)}</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-jni-access-registrations" target="_blank">JNI</a></td>
<td align="right">${analysis.classes.jni}</td>
<td align="right">${toPercent(analysis.classes.jni, analysis.classes.total)}</td>
<td align="right">${analysis.fields.jni}</td>
<td align="right">${toPercent(analysis.fields.jni, analysis.fields.total)}</td>
<td align="right">${analysis.methods.jni}</td>
<td align="right">${toPercent(analysis.methods.jni, analysis.methods.total)}</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-reachability" target="_blank">Loaded</a></td>
<td align="right">${analysis.classes.total}</td>
<td align="right">100.000%</td>
<td align="right">${analysis.fields.total}</td>
<td align="right">100.000%</td>
<td align="right">${analysis.methods.total}</td>
<td align="right">100.000%</td>
</tr>
</tbody>
</table>
#### Image Details #### Image Details
| Category | Size | in % | Details | <table>
|:---------|-----:|-----:|:--------| <thead>
| [Code area](${DOCS_BASE}#glossary-code-area)| ${bytesToHuman(details.code_area.bytes)} | ${toPercent(details.code_area.bytes, details.total_bytes)} | ${details.code_area.compilation_units} compilation units | <tr>
| [Image heap](${DOCS_BASE}#glossary-image-heap) | ${bytesToHuman(details.image_heap.bytes)} | ${toPercent(details.image_heap.bytes, details.total_bytes)} | ${bytesToHuman(details.image_heap.resources.bytes)} for ${details.image_heap.resources.count} resources |${debugInfoLine} <th align="left">Category</th>
| [Other data](${DOCS_BASE}#glossary-other-data) | ${bytesToHuman(otherBytes)} | ${toPercent(otherBytes, details.total_bytes)} | | <th align="right">Size</th>
| Total | **${bytesToHuman(details.total_bytes)}** | 100.000% | | <th align="right">in %</th>
<th align="left">Details</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-code-area" target="_blank">Code area</a></td>
<td align="right">${bytesToHuman(details.code_area.bytes)}</td>
<td align="right">${toPercent(details.code_area.bytes, details.total_bytes)}</td>
<td align="left">${details.code_area.compilation_units} compilation units</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-image-heap" target="_blank">Image heap</a></td>
<td align="right">${bytesToHuman(details.image_heap.bytes)}</td>
<td align="right">${toPercent(details.image_heap.bytes, details.total_bytes)}</td>
<td align="left">${bytesToHuman(details.image_heap.resources.bytes)} for ${details.image_heap.resources.count} resources</td>
</tr>${debugInfoLine}
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-other-data" target="_blank">Other data</a></td>
<td align="right">${bytesToHuman(otherBytes)}</td>
<td align="right">${toPercent(otherBytes, details.total_bytes)}</td>
<td align="left"></td>
</tr>
<tr>
<td align="left">Total</td>
<td align="right"><strong>${bytesToHuman(details.total_bytes)}</strong></td>
<td align="right">100.000%</td>
<td align="left"></td>
</tr>
</tbody>
</table>
#### Resource Usage #### Resource Usage
| Category | | <table>
|:---------|:------| <tbody>
| [GCs](${DOCS_BASE}#glossary-garbage-collections) | ${resources.garbage_collection.total_secs.toFixed(2)}s in ${resources.garbage_collection.count} GCs | <tr>
| [Peak RSS](${DOCS_BASE}#glossary-peak-rss) | ${bytesToHuman(resources.memory.peak_rss_bytes)} | <td align="left"><a href="${DOCS_BASE}#glossary-garbage-collections" target="_blank">Garbage collection</a></td>
| [CPU load](${DOCS_BASE}#glossary-cpu-load) | ${resources.cpu.load.toFixed(3)} (${toPercent(resources.cpu.load, resources.cpu.total_cores)} of ${resources.cpu.total_cores} CPU cores) | <td align="left">${resources.garbage_collection.total_secs.toFixed(2)}s in ${resources.garbage_collection.count} GCs</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-peak-rss" target="_blank">Peak RSS</a></td>
<td align="left">${bytesToHuman(resources.memory.peak_rss_bytes)} (${toPercent(resources.memory.peak_rss_bytes, resources.memory.system_total)} of ${bytesToHuman(resources.memory.system_total)} system memory)</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-cpu-load" target="_blank">CPU load</a></td>
<td align="left">${resources.cpu.load.toFixed(3)} (${toPercent(resources.cpu.load, resources.cpu.total_cores)} of ${resources.cpu.total_cores} CPU cores)</td>
</tr>
</tbody>
</table>
_Report generated by [setup-graalvm](https://github.com/marketplace/actions/github-action-for-graalvm)._`; <em>Report generated by <a href="https://github.com/marketplace/actions/github-action-for-graalvm" target="_blank">setup-graalvm</a>.</em>`;
} }
function toPercent(part, total) { function toPercent(part, total) {
return `${((part / total) * 100).toFixed(3)}%`; return `${((part / total) * 100).toFixed(3)}%`;

153
dist/main/index.js generated vendored
View File

@ -74220,6 +74220,7 @@ exports.generateReports = exports.setUpNativeImageBuildReports = void 0;
const c = __importStar(__nccwpck_require__(9042)); const c = __importStar(__nccwpck_require__(9042));
const core = __importStar(__nccwpck_require__(2186)); const core = __importStar(__nccwpck_require__(2186));
const fs = __importStar(__nccwpck_require__(7147)); const fs = __importStar(__nccwpck_require__(7147));
const github = __importStar(__nccwpck_require__(5438));
const path_1 = __nccwpck_require__(1017); const path_1 = __nccwpck_require__(1017);
const os_1 = __nccwpck_require__(2037); const os_1 = __nccwpck_require__(2037);
const utils_1 = __nccwpck_require__(1314); const utils_1 = __nccwpck_require__(1314);
@ -74293,6 +74294,7 @@ function setNativeImageOption(value) {
} }
} }
function createReport(data) { function createReport(data) {
const context = github.context;
const info = data.general_info; const info = data.general_info;
const analysis = data.analysis_results; const analysis = data.analysis_results;
const details = data.image_details; const details = data.image_details;
@ -74303,40 +74305,149 @@ function createReport(data) {
debugInfoBytes; debugInfoBytes;
let debugInfoLine = ''; let debugInfoLine = '';
if (details.debug_info) { if (details.debug_info) {
debugInfoLine = `\n| [Debug info](${DOCS_BASE}#glossary-debug-info) | ${bytesToHuman(debugInfoBytes)} | ${toPercent(debugInfoBytes, details.total_bytes)} | |`; debugInfoLine = `
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-debug-info" target="_blank">Debug info</a></td>
<td align="right">${bytesToHuman(debugInfoBytes)}</td>
<td align="right">${toPercent(debugInfoBytes, details.total_bytes)}</td>
<td align="left"></td>
</tr>`;
} }
const resources = data.resource_usage; const resources = data.resource_usage;
return `## Generated \`${info.name}\` return `## GraalVM Native Image Build Report
using [Native Image](https://www.graalvm.org/native-image/) from ${info.graalvm_version} (${info.java_version}). \`${info.name}\` generated as part of the '${context.job}' job in run <a href="${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}" target="_blank">#${context.runNumber}</a>.
#### Environment
<table>
<tr>
<td><a href="${DOCS_BASE}#glossary-version-info" target="_blank">GraalVM version</a></td>
<td>${info.graalvm_version}</td>
<td><a href="${DOCS_BASE}#glossary-ccompiler" target="_blank">C compiler</a></td>
<td>${info.c_compiler}</td>
</tr>
<tr>
<td><a href="${DOCS_BASE}#glossary-java-version-info" target="_blank">Java version</a></td>
<td>${info.java_version}</td>
<td><a href="${DOCS_BASE}#glossary-gc" target="_blank">Garbage collector</a></td>
<td>${info.garbage_collector}</td>
</tr>
</table>
#### Analysis Results #### Analysis Results
| Category | Types | in % | Fields | in % | Methods | in % | <table>
|:---------|------:|-----:|-------:|-----:|--------:|-----:| <thead>
| [Reachable](${DOCS_BASE}#glossary-reachability) | ${analysis.classes.reachable} | ${toPercent(analysis.classes.reachable, analysis.classes.total)} | ${analysis.fields.reachable} | ${toPercent(analysis.fields.reachable, analysis.fields.total)} | ${analysis.methods.reachable} | ${toPercent(analysis.methods.reachable, analysis.methods.total)} | <tr>
| [Reflection](${DOCS_BASE}#glossary-reflection-registrations) | ${analysis.classes.reflection} | ${toPercent(analysis.classes.reflection, analysis.classes.total)} | ${analysis.fields.reflection} | ${toPercent(analysis.fields.reflection, analysis.fields.total)} | ${analysis.methods.reflection} | ${toPercent(analysis.methods.reflection, analysis.methods.total)} | <th align="left">Category</th>
| [JNI](${DOCS_BASE}#glossary-jni-access-registrations) | ${analysis.classes.jni} | ${toPercent(analysis.classes.jni, analysis.classes.total)} | ${analysis.fields.jni} | ${toPercent(analysis.fields.jni, analysis.fields.total)} | ${analysis.methods.jni} | ${toPercent(analysis.methods.jni, analysis.methods.total)} | <th align="right">Types</th>
| [Loaded](${DOCS_BASE}#glossary-reachability) | ${analysis.classes.total} | 100.000% | ${analysis.fields.total} | 100.000% | ${analysis.methods.total} | 100.000% | <th align="right">in %</th>
<th align="right">Fields</th>
<th align="right">in %</th>
<th align="right">Methods</th>
<th align="right">in %</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-reachability" target="_blank">Reachable</a></td>
<td align="right">${analysis.classes.reachable}</td>
<td align="right">${toPercent(analysis.classes.reachable, analysis.classes.total)}</td>
<td align="right">${analysis.fields.reachable}</td>
<td align="right">${toPercent(analysis.fields.reachable, analysis.fields.total)}</td>
<td align="right">${analysis.methods.reachable}</td>
<td align="right">${toPercent(analysis.methods.reachable, analysis.methods.total)}</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-reflection-registrations" target="_blank">Reflection</a></td>
<td align="right">${analysis.classes.reflection}</td>
<td align="right">${toPercent(analysis.classes.reflection, analysis.classes.total)}</td>
<td align="right">${analysis.fields.reflection}</td>
<td align="right">${toPercent(analysis.fields.reflection, analysis.fields.total)}</td>
<td align="right">${analysis.methods.reflection}</td>
<td align="right">${toPercent(analysis.methods.reflection, analysis.methods.total)}</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-jni-access-registrations" target="_blank">JNI</a></td>
<td align="right">${analysis.classes.jni}</td>
<td align="right">${toPercent(analysis.classes.jni, analysis.classes.total)}</td>
<td align="right">${analysis.fields.jni}</td>
<td align="right">${toPercent(analysis.fields.jni, analysis.fields.total)}</td>
<td align="right">${analysis.methods.jni}</td>
<td align="right">${toPercent(analysis.methods.jni, analysis.methods.total)}</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-reachability" target="_blank">Loaded</a></td>
<td align="right">${analysis.classes.total}</td>
<td align="right">100.000%</td>
<td align="right">${analysis.fields.total}</td>
<td align="right">100.000%</td>
<td align="right">${analysis.methods.total}</td>
<td align="right">100.000%</td>
</tr>
</tbody>
</table>
#### Image Details #### Image Details
| Category | Size | in % | Details | <table>
|:---------|-----:|-----:|:--------| <thead>
| [Code area](${DOCS_BASE}#glossary-code-area)| ${bytesToHuman(details.code_area.bytes)} | ${toPercent(details.code_area.bytes, details.total_bytes)} | ${details.code_area.compilation_units} compilation units | <tr>
| [Image heap](${DOCS_BASE}#glossary-image-heap) | ${bytesToHuman(details.image_heap.bytes)} | ${toPercent(details.image_heap.bytes, details.total_bytes)} | ${bytesToHuman(details.image_heap.resources.bytes)} for ${details.image_heap.resources.count} resources |${debugInfoLine} <th align="left">Category</th>
| [Other data](${DOCS_BASE}#glossary-other-data) | ${bytesToHuman(otherBytes)} | ${toPercent(otherBytes, details.total_bytes)} | | <th align="right">Size</th>
| Total | **${bytesToHuman(details.total_bytes)}** | 100.000% | | <th align="right">in %</th>
<th align="left">Details</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-code-area" target="_blank">Code area</a></td>
<td align="right">${bytesToHuman(details.code_area.bytes)}</td>
<td align="right">${toPercent(details.code_area.bytes, details.total_bytes)}</td>
<td align="left">${details.code_area.compilation_units} compilation units</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-image-heap" target="_blank">Image heap</a></td>
<td align="right">${bytesToHuman(details.image_heap.bytes)}</td>
<td align="right">${toPercent(details.image_heap.bytes, details.total_bytes)}</td>
<td align="left">${bytesToHuman(details.image_heap.resources.bytes)} for ${details.image_heap.resources.count} resources</td>
</tr>${debugInfoLine}
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-other-data" target="_blank">Other data</a></td>
<td align="right">${bytesToHuman(otherBytes)}</td>
<td align="right">${toPercent(otherBytes, details.total_bytes)}</td>
<td align="left"></td>
</tr>
<tr>
<td align="left">Total</td>
<td align="right"><strong>${bytesToHuman(details.total_bytes)}</strong></td>
<td align="right">100.000%</td>
<td align="left"></td>
</tr>
</tbody>
</table>
#### Resource Usage #### Resource Usage
| Category | | <table>
|:---------|:------| <tbody>
| [GCs](${DOCS_BASE}#glossary-garbage-collections) | ${resources.garbage_collection.total_secs.toFixed(2)}s in ${resources.garbage_collection.count} GCs | <tr>
| [Peak RSS](${DOCS_BASE}#glossary-peak-rss) | ${bytesToHuman(resources.memory.peak_rss_bytes)} | <td align="left"><a href="${DOCS_BASE}#glossary-garbage-collections" target="_blank">Garbage collection</a></td>
| [CPU load](${DOCS_BASE}#glossary-cpu-load) | ${resources.cpu.load.toFixed(3)} (${toPercent(resources.cpu.load, resources.cpu.total_cores)} of ${resources.cpu.total_cores} CPU cores) | <td align="left">${resources.garbage_collection.total_secs.toFixed(2)}s in ${resources.garbage_collection.count} GCs</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-peak-rss" target="_blank">Peak RSS</a></td>
<td align="left">${bytesToHuman(resources.memory.peak_rss_bytes)} (${toPercent(resources.memory.peak_rss_bytes, resources.memory.system_total)} of ${bytesToHuman(resources.memory.system_total)} system memory)</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-cpu-load" target="_blank">CPU load</a></td>
<td align="left">${resources.cpu.load.toFixed(3)} (${toPercent(resources.cpu.load, resources.cpu.total_cores)} of ${resources.cpu.total_cores} CPU cores)</td>
</tr>
</tbody>
</table>
_Report generated by [setup-graalvm](https://github.com/marketplace/actions/github-action-for-graalvm)._`; <em>Report generated by <a href="https://github.com/marketplace/actions/github-action-for-graalvm" target="_blank">setup-graalvm</a>.</em>`;
} }
function toPercent(part, total) { function toPercent(part, total) {
return `${((part / total) * 100).toFixed(3)}%`; return `${((part / total) * 100).toFixed(3)}%`;

View File

@ -1,6 +1,7 @@
import * as c from '../constants' import * as c from '../constants'
import * as core from '@actions/core' import * as core from '@actions/core'
import * as fs from 'fs' import * as fs from 'fs'
import * as github from '@actions/github'
import {join} from 'path' import {join} from 'path'
import {tmpdir} from 'os' import {tmpdir} from 'os'
import {createPRComment, isPREvent, toSemVer} from '../utils' import {createPRComment, isPREvent, toSemVer} from '../utils'
@ -149,6 +150,7 @@ function setNativeImageOption(value: string): void {
} }
function createReport(data: BuildOutput): string { function createReport(data: BuildOutput): string {
const context = github.context
const info = data.general_info const info = data.general_info
const analysis = data.analysis_results const analysis = data.analysis_results
const details = data.image_details const details = data.image_details
@ -160,89 +162,204 @@ function createReport(data: BuildOutput): string {
debugInfoBytes debugInfoBytes
let debugInfoLine = '' let debugInfoLine = ''
if (details.debug_info) { if (details.debug_info) {
debugInfoLine = `\n| [Debug info](${DOCS_BASE}#glossary-debug-info) | ${bytesToHuman( debugInfoLine = `
debugInfoBytes <tr>
)} | ${toPercent(debugInfoBytes, details.total_bytes)} | |` <td align="left"><a href="${DOCS_BASE}#glossary-debug-info" target="_blank">Debug info</a></td>
<td align="right">${bytesToHuman(debugInfoBytes)}</td>
<td align="right">${toPercent(debugInfoBytes, details.total_bytes)}</td>
<td align="left"></td>
</tr>`
} }
const resources = data.resource_usage const resources = data.resource_usage
return `## Generated \`${info.name}\` return `## GraalVM Native Image Build Report
using [Native Image](https://www.graalvm.org/native-image/) from ${ \`${info.name}\` generated as part of the '${
info.graalvm_version context.job
} (${info.java_version}). }' job in run <a href="${context.serverUrl}/${context.repo.owner}/${
context.repo.repo
}/actions/runs/${context.runId}" target="_blank">#${context.runNumber}</a>.
#### Environment
<table>
<tr>
<td><a href="${DOCS_BASE}#glossary-version-info" target="_blank">GraalVM version</a></td>
<td>${info.graalvm_version}</td>
<td><a href="${DOCS_BASE}#glossary-ccompiler" target="_blank">C compiler</a></td>
<td>${info.c_compiler}</td>
</tr>
<tr>
<td><a href="${DOCS_BASE}#glossary-java-version-info" target="_blank">Java version</a></td>
<td>${info.java_version}</td>
<td><a href="${DOCS_BASE}#glossary-gc" target="_blank">Garbage collector</a></td>
<td>${info.garbage_collector}</td>
</tr>
</table>
#### Analysis Results #### Analysis Results
| Category | Types | in % | Fields | in % | Methods | in % | <table>
|:---------|------:|-----:|-------:|-----:|--------:|-----:| <thead>
| [Reachable](${DOCS_BASE}#glossary-reachability) | ${ <tr>
analysis.classes.reachable <th align="left">Category</th>
} | ${toPercent(analysis.classes.reachable, analysis.classes.total)} | ${ <th align="right">Types</th>
analysis.fields.reachable <th align="right">in %</th>
} | ${toPercent(analysis.fields.reachable, analysis.fields.total)} | ${ <th align="right">Fields</th>
analysis.methods.reachable <th align="right">in %</th>
} | ${toPercent(analysis.methods.reachable, analysis.methods.total)} | <th align="right">Methods</th>
| [Reflection](${DOCS_BASE}#glossary-reflection-registrations) | ${ <th align="right">in %</th>
analysis.classes.reflection </tr>
} | ${toPercent(analysis.classes.reflection, analysis.classes.total)} | ${ </thead>
analysis.fields.reflection <tbody>
} | ${toPercent(analysis.fields.reflection, analysis.fields.total)} | ${ <tr>
analysis.methods.reflection <td align="left"><a href="${DOCS_BASE}#glossary-reachability" target="_blank">Reachable</a></td>
} | ${toPercent(analysis.methods.reflection, analysis.methods.total)} | <td align="right">${analysis.classes.reachable}</td>
| [JNI](${DOCS_BASE}#glossary-jni-access-registrations) | ${ <td align="right">${toPercent(
analysis.classes.jni analysis.classes.reachable,
} | ${toPercent(analysis.classes.jni, analysis.classes.total)} | ${
analysis.fields.jni
} | ${toPercent(analysis.fields.jni, analysis.fields.total)} | ${
analysis.methods.jni
} | ${toPercent(analysis.methods.jni, analysis.methods.total)} |
| [Loaded](${DOCS_BASE}#glossary-reachability) | ${
analysis.classes.total analysis.classes.total
} | 100.000% | ${analysis.fields.total} | 100.000% | ${ )}</td>
<td align="right">${analysis.fields.reachable}</td>
<td align="right">${toPercent(
analysis.fields.reachable,
analysis.fields.total
)}</td>
<td align="right">${analysis.methods.reachable}</td>
<td align="right">${toPercent(
analysis.methods.reachable,
analysis.methods.total analysis.methods.total
} | 100.000% | )}</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-reflection-registrations" target="_blank">Reflection</a></td>
<td align="right">${analysis.classes.reflection}</td>
<td align="right">${toPercent(
analysis.classes.reflection,
analysis.classes.total
)}</td>
<td align="right">${analysis.fields.reflection}</td>
<td align="right">${toPercent(
analysis.fields.reflection,
analysis.fields.total
)}</td>
<td align="right">${analysis.methods.reflection}</td>
<td align="right">${toPercent(
analysis.methods.reflection,
analysis.methods.total
)}</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-jni-access-registrations" target="_blank">JNI</a></td>
<td align="right">${analysis.classes.jni}</td>
<td align="right">${toPercent(
analysis.classes.jni,
analysis.classes.total
)}</td>
<td align="right">${analysis.fields.jni}</td>
<td align="right">${toPercent(
analysis.fields.jni,
analysis.fields.total
)}</td>
<td align="right">${analysis.methods.jni}</td>
<td align="right">${toPercent(
analysis.methods.jni,
analysis.methods.total
)}</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-reachability" target="_blank">Loaded</a></td>
<td align="right">${analysis.classes.total}</td>
<td align="right">100.000%</td>
<td align="right">${analysis.fields.total}</td>
<td align="right">100.000%</td>
<td align="right">${analysis.methods.total}</td>
<td align="right">100.000%</td>
</tr>
</tbody>
</table>
#### Image Details #### Image Details
| Category | Size | in % | Details | <table>
|:---------|-----:|-----:|:--------| <thead>
| [Code area](${DOCS_BASE}#glossary-code-area)| ${bytesToHuman( <tr>
details.code_area.bytes <th align="left">Category</th>
)} | ${toPercent(details.code_area.bytes, details.total_bytes)} | ${ <th align="right">Size</th>
<th align="right">in %</th>
<th align="left">Details</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-code-area" target="_blank">Code area</a></td>
<td align="right">${bytesToHuman(details.code_area.bytes)}</td>
<td align="right">${toPercent(
details.code_area.bytes,
details.total_bytes
)}</td>
<td align="left">${
details.code_area.compilation_units details.code_area.compilation_units
} compilation units | } compilation units</td>
| [Image heap](${DOCS_BASE}#glossary-image-heap) | ${bytesToHuman( </tr>
details.image_heap.bytes <tr>
)} | ${toPercent( <td align="left"><a href="${DOCS_BASE}#glossary-image-heap" target="_blank">Image heap</a></td>
<td align="right">${bytesToHuman(details.image_heap.bytes)}</td>
<td align="right">${toPercent(
details.image_heap.bytes, details.image_heap.bytes,
details.total_bytes details.total_bytes
)} | ${bytesToHuman(details.image_heap.resources.bytes)} for ${ )}</td>
details.image_heap.resources.count <td align="left">${bytesToHuman(
} resources |${debugInfoLine} details.image_heap.resources.bytes
| [Other data](${DOCS_BASE}#glossary-other-data) | ${bytesToHuman( )} for ${details.image_heap.resources.count} resources</td>
otherBytes </tr>${debugInfoLine}
)} | ${toPercent(otherBytes, details.total_bytes)} | | <tr>
| Total | **${bytesToHuman(details.total_bytes)}** | 100.000% | | <td align="left"><a href="${DOCS_BASE}#glossary-other-data" target="_blank">Other data</a></td>
<td align="right">${bytesToHuman(otherBytes)}</td>
<td align="right">${toPercent(otherBytes, details.total_bytes)}</td>
<td align="left"></td>
</tr>
<tr>
<td align="left">Total</td>
<td align="right"><strong>${bytesToHuman(
details.total_bytes
)}</strong></td>
<td align="right">100.000%</td>
<td align="left"></td>
</tr>
</tbody>
</table>
#### Resource Usage #### Resource Usage
| Category | | <table>
|:---------|:------| <tbody>
| [GCs](${DOCS_BASE}#glossary-garbage-collections) | ${resources.garbage_collection.total_secs.toFixed( <tr>
<td align="left"><a href="${DOCS_BASE}#glossary-garbage-collections" target="_blank">Garbage collection</a></td>
<td align="left">${resources.garbage_collection.total_secs.toFixed(
2 2
)}s in ${resources.garbage_collection.count} GCs | )}s in ${resources.garbage_collection.count} GCs</td>
| [Peak RSS](${DOCS_BASE}#glossary-peak-rss) | ${bytesToHuman( </tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-peak-rss" target="_blank">Peak RSS</a></td>
<td align="left">${bytesToHuman(
resources.memory.peak_rss_bytes resources.memory.peak_rss_bytes
)} | )} (${toPercent(
| [CPU load](${DOCS_BASE}#glossary-cpu-load) | ${resources.cpu.load.toFixed( resources.memory.peak_rss_bytes,
3 resources.memory.system_total
)} (${toPercent(resources.cpu.load, resources.cpu.total_cores)} of ${ )} of ${bytesToHuman(resources.memory.system_total)} system memory)</td>
</tr>
<tr>
<td align="left"><a href="${DOCS_BASE}#glossary-cpu-load" target="_blank">CPU load</a></td>
<td align="left">${resources.cpu.load.toFixed(3)} (${toPercent(
resources.cpu.load,
resources.cpu.total_cores resources.cpu.total_cores
} CPU cores) | )} of ${resources.cpu.total_cores} CPU cores)</td>
</tr>
</tbody>
</table>
_Report generated by [setup-graalvm](https://github.com/marketplace/actions/github-action-for-graalvm)._` <em>Report generated by <a href="https://github.com/marketplace/actions/github-action-for-graalvm" target="_blank">setup-graalvm</a>.</em>`
} }
function toPercent(part: number, total: number): string { function toPercent(part: number, total: number): string {