forked from spring-attic/spring-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-key-samples.sh
More file actions
executable file
·28 lines (22 loc) · 850 Bytes
/
build-key-samples.sh
File metadata and controls
executable file
·28 lines (22 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
RC=0
echo "GraalVM: `native-image --version`" > samples-summary.csv
echo "Date,Sample,Build Time (s),Build Mem (GB),RSS Mem (M),Image Size (M),Startup Time (s),JVM Uptime (s), ReflectConfig (lines)" >> samples-summary.csv
for i in commandlinerunner webflux-netty webmvc-tomcat webflux-thymeleaf grpc jdbc-tx class-proxies-aop batch
do
if ! (cd samples/$i && ./build.sh); then
RC=1
fi
if [ -f "samples/$i/target/native/summary.csv" ]; then
cat samples/$i/target/native/summary.csv >> samples-summary.csv
else
echo `date +%Y%m%d-%H%M`,$i,ERROR,,,,,, >> samples-summary.csv
fi
done
head -1 samples-summary.csv
if ! [ -x "$(command -v tty-table)" ]; then
tail -n +2 samples-summary.csv | perl -pe 's/((?<=,)|(?<=^)),/ ,/g;' | column -t -s,
else
tail -n +2 samples-summary.csv | tty-table
fi
exit $RC