Skip to content

Commit

Permalink
addressed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gargnitingoogle committed Nov 17, 2023
1 parent c6c3722 commit 00a6876
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
28 changes: 20 additions & 8 deletions perfmetrics/scripts/fio/install_fio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,33 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# Args:
# $1: <path-to-clone-fio-source-code> e.g. ~/github/

set -e

if [[ $# -eq 0 ]] ; then
echo 'No argument passed.'
echo 'Args: <path-to-clone-fio-source-code>'
exit 1
fi

SRC_DIR="$1"
FIO_SRC_DIR="${SRC_DIR}/fio"

echo "Installing fio ..."
# install libaio as fio has a dependency on libaio
sudo apt-get install -y libaio-dev

# We are building fio from source because of issue: https://github.com/axboe/fio/issues/1640.
# The fix is not currently released in a package as of 20th Oct, 2023.
# TODO: install fio via package when release > 3.35 is available.
FIO_SRC_DIR="${KOKORO_ARTIFACTS_DIR}/github/fio"
sudo rm -rf "${FIO_SRC_DIR}" && \
git clone https://github.com/axboe/fio.git "$FIO_SRC_DIR"
# We are building fio from source because of the issue: https://github.com/axboe/fio/issues/1668.
sudo rm -rf "$FIO_SRC_DIR" && \
git clone https://github.com/axboe/fio.git "$FIO_SRC_DIR" && \
cd "$FIO_SRC_DIR" && \
git checkout c5d8ce3fc736210ded83b126c71e3225c7ffd7c9 && \
git checkout fio-3.35 && \
./configure && make && sudo make install

# Now, print the installed fio version for verification
echo 'fio version='$(fio -version)
echo 'fio version='$(fio -version)

# go back to the original directory
cd -
2 changes: 1 addition & 1 deletion perfmetrics/scripts/presubmit_test/pr_perf_test/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function install_requirements() {
pip install google-cloud-vision
pip install google-api-python-client
pip install prettytable
"${KOKORO_ARTIFACTS_DIR}"/github/gcsfuse/perfmetrics/scripts/fio/install_fio.sh
"${KOKORO_ARTIFACTS_DIR}/github/gcsfuse/perfmetrics/scripts/fio/install_fio.sh" "${KOKORO_ARTIFACTS_DIR}/github"
cd "${KOKORO_ARTIFACTS_DIR}/github/gcsfuse"
}

Expand Down
2 changes: 1 addition & 1 deletion perfmetrics/scripts/run_load_test_and_fetch_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ set -e

echo "Installing pip"
sudo apt-get install pip -y
"${KOKORO_ARTIFACTS_DIR}"/github/gcsfuse/perfmetrics/scripts/fio/install_fio.sh
"${KOKORO_ARTIFACTS_DIR}/github/gcsfuse/perfmetrics/scripts/fio/install_fio.sh" "${KOKORO_ARTIFACTS_DIR}/github"

cd "${KOKORO_ARTIFACTS_DIR}/github/gcsfuse/perfmetrics/scripts"

Expand Down

0 comments on commit 00a6876

Please sign in to comment.