Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Modeling fcrepo4 time to run specs
#!/bin/bash
# Performance testing normalization for disk related operations
# Regression modeling for fcrepo performance (P) modeled by device write (W) and java startup time (J)
# P ~ W + J
## CSV format for time output. Will be munged by subsequent analysis
FORMAT_HEADER="wall_time,user_time,system_time"
FORMAT_STRING="%e,%U,%S"
# Collect duration data for storage device write operations.
## Run warmup
sh -c "dd if=/dev/zero of=ddfile bs=80k count=25000 status=none && sync"; rm ddfile
## K writes.
echo "K writes"
# Use -o k_writes.csv and --append options to write to file
/usr/bin/time -f ${FORMAT_STRING} sh -c "dd if=/dev/zero of=ddfile bs=8k count=250000 status=none && sync"; rm ddfile
## M writes.
echo "M writes"
# Use -o m_writes.csv and --append options to write to file
/usr/bin/time -f ${FORMAT_STRING} sh -c "dd if=/dev/zero of=ddfile bs=8000k count=250 status=none && sync"; rm ddfile
## G writes.
echo "G writes"
# Use -o g_writes.csv and --append options to write to file
/usr/bin/time -f ${FORMAT_STRING} sh -c "dd if=/dev/zero of=ddfile bs=1G count=2 status=none && sync"; rm ddfile
# Collect duration data for java startup times.
## Run warmup
bash -c "for i in {0..2}; do java -jar dummy_java.jar; done;"
## Time startups
echo "JVM starts"
/usr/bin/time -f ${FORMAT_STRING} bash -c "for i in {0..9}; do java -jar dummy_java.jar; done;"
# Collect duration data for fcrepo disk write tests.
java org.junit.runner.JUnitCore junitfaq.AbstractResourceIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.