crosvm/e2e_tests/guest_under_test/rootfs_benches/postgres.sh
Zihan Chen 5db1e3c1fc e2e_tests: Add postgres benchmark
Add a preliminary version of pgbench running in e2e_tests
facilities. It currently does nothing with the benchmark result.

TEST=Can pass and produce results with `./tools/bench postgres`

BUG=b:257303497

Change-Id: If2f06cb0a9c91f5d7240094bacf86fc681062127
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4763144
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Zihan Chen <zihanchen@google.com>
2023-09-20 19:00:15 +00:00

14 lines
511 B
Bash

#!/bin/bash
# Copyright 2023 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Generate compressed rootfs image for postgres e2e benchmark
# Result will be stored as /tmp/psql.img.zst
CONTAINER=$(podman create ghcr.io/cloudnative-pg/postgresql:15.3)
podman export $CONTAINER > /tmp/psql.tar
podman rm $CONTAINER
virt-make-fs --format=raw --size=+512M --type=ext4 /tmp/psql.tar /tmp/psql.img
rm /tmp/psql.tar
zstd --rm /tmp/psql.img