11#! /bin/bash
2+ #
3+ # Copyright © 2016-2025 The LmdbJava Open Source Project
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+ #
17+
218set -euo pipefail
319
420# Set working directory
@@ -49,7 +65,7 @@ get_cpu_count() {
4965 grep -c " ^processor" /proc/cpuinfo
5066}
5167
52- get_total_ram_gb () {
68+ get_total_ram_gib () {
5369 awk ' /MemTotal/ {printf "%.0f", $2/1024/1024}' /proc/meminfo
5470}
5571
@@ -71,7 +87,7 @@ check_tmpfs() {
7187
7288CPU_MODEL=$( get_cpu_info)
7389CPU_COUNT=$( get_cpu_count)
74- RAM_GB =$( get_total_ram_gb )
90+ RAM_GIB =$( get_total_ram_gib )
7591KERNEL=$( get_kernel)
7692JAVA_VERSION=$( get_java_version)
7793TMP_FS=$( check_tmpfs)
@@ -115,7 +131,7 @@ echo ""
115131
116132echo " System Information:"
117133echo " CPU: $CPU_MODEL (${CPU_COUNT} cores)"
118- echo " RAM: ${RAM_GB} GB "
134+ echo " RAM: ${RAM_GIB} GiB "
119135echo " Kernel: Linux $KERNEL "
120136echo " Java: $JAVA_VERSION "
121137echo " /tmp filesystem: $TMP_FS "
@@ -189,7 +205,7 @@ following configuration:
189205| Component | Details |
190206| :-------- | :------ |
191207| CPU | ${CPU_MODEL} (${CPU_COUNT} cores) |
192- | RAM | ${RAM_GB} GB |
208+ | RAM | ${RAM_GIB} GiB |
193209| OS | Linux ${KERNEL} (x86_64) |
194210| Java | ${JAVA_VERSION} |
195211| JMH | ${JMH_VERSION} |
0 commit comments