mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
benchmarks: add descriptions
Benchmark scripts now have optional descriptions that will be persisted into the JSON output.
This commit is contained in:
@@ -200,6 +200,8 @@ for TEST_PATH in "${BENCHMARK_DIR}"/*; do
|
||||
continue
|
||||
fi
|
||||
|
||||
TEST_DESCRIPTION=$(( grep '^# Description: ' "${TEST_PATH}" || test $? = 1 ) | sed -e "s/^# Description: //")
|
||||
|
||||
ANY_FOUND=1
|
||||
TEST_NAME="${TEST_FILE/__/::}"
|
||||
|
||||
@@ -267,7 +269,7 @@ for TEST_PATH in "${BENCHMARK_DIR}"/*; do
|
||||
fi
|
||||
|
||||
# add our metadata to the hyperfine json result
|
||||
jq ". |= { \"name\": \"${TEST_NAME}\" } + ." < "${JSON_FILE}" > "${JSON_FILE}.new" && mv "${JSON_FILE}.new" "${JSON_FILE}"
|
||||
jq ". |= { \"name\": \"${TEST_NAME}\", \"description\": \"${TEST_DESCRIPTION}\" } + ." < "${JSON_FILE}" > "${JSON_FILE}.new" && mv "${JSON_FILE}.new" "${JSON_FILE}"
|
||||
|
||||
# run with flamegraph output if requested
|
||||
if [ "${FLAMEGRAPH}" ]; then
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: blame a file in the core git repository
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: blame a file in the linux repository
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: blame a simple file in the test repository
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: hash a 100kb text file
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: hash a 10mb text file
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: hash a 1kb text file
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: hash a 100kb text file (after flushing disk cache)
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: hash a 10mb text file (after flushing disk cache)
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: hash a 1kb text file (after flushing disk cache)
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: write a 100kb text file to the object database
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: write a 10mb text file to the object database
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: write a 1kb text file to the object database
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: write a 100kb text file to the ODB (after flushing disk cache)
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: write a 10mb text file to the ODB (after flushing disk cache)
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: write a 1kb text file to the ODB (after flushing disk cache)
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash -e
|
||||
#
|
||||
# Description: index a 250mb packfile
|
||||
|
||||
. "$(dirname "$0")/benchmark_helpers.sh"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user