bean-mapping: Dozer 7.0.0 vs MapStruct 1.6.3 module (basic/nested/collection/null handling, silent-failure pitfalls, records, lazy getters, parity test, compile-failure demos, JMH benchmark), 14 contract tests
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b6ZEVHGaYy15HAxRzy
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
a714780bca
commit
91f0757259
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
# Regenerates every file in ../output/. Requires JDK25_HOME. Linux/macOS only.
|
||||
set -euo pipefail
|
||||
[[ -z "${JDK25_HOME:-}" ]] && { echo "JDK25_HOME must be set" >&2; exit 1; }
|
||||
cd "$(dirname "$0")/.."
|
||||
OUT=output; mkdir -p "$OUT"
|
||||
export JAVA_HOME="$JDK25_HOME"
|
||||
mvn -q -f ../pom.xml -pl bean-mapping -am package
|
||||
J="$JDK25_HOME/bin/java"
|
||||
CP="target/classes:target/lib/*"
|
||||
run() { echo "==> $1"; "$J" -cp "$CP" "$1" 2>&1 | grep -v "Picked up" > "$OUT/$2"; }
|
||||
{ echo '$ java -version'; "$J" -version 2>&1 | grep -v "Picked up"; echo
|
||||
echo '$ uname -sr'; uname -sr
|
||||
echo '$ nproc'; nproc
|
||||
echo '$ grep -m1 "model name" /proc/cpuinfo'; grep -m1 "model name" /proc/cpuinfo || true
|
||||
echo; echo 'Dozer 7.0.0, MapStruct 1.6.3, JMH 1.37'; } > "$OUT/00-environment.txt"
|
||||
run com.ankurm.beanmapping.dozer.DozerTour 01-dozer-tour.txt
|
||||
run com.ankurm.beanmapping.dozer.DozerPitfalls 02-dozer-pitfalls.txt
|
||||
run com.ankurm.beanmapping.mapstruct.MapStructTour 03-mapstruct-tour.txt
|
||||
cp "$(find target/generated-sources -name UserMapperImpl.java)" "$OUT/04-UserMapperImpl.java.txt"
|
||||
./scripts/compile-broken.sh > "$OUT/05-broken-compile.txt" 2>&1 || true
|
||||
cp target/surefire-reports/com.ankurm.beanmapping.BeanMappingClaimsTest.txt "$OUT/06-tests.txt"
|
||||
if [[ -z "${SKIP_BENCHMARK:-}" ]]; then
|
||||
echo "==> benchmark (about four minutes; set SKIP_BENCHMARK=1 to skip)"
|
||||
./scripts/run-benchmark.sh | tee "$OUT/07-benchmark.txt" > /dev/null
|
||||
fi
|
||||
echo Done
|
||||
Reference in New Issue
Block a user