From e595be7d5a296f88191adc28fb601b2e1524b91b Mon Sep 17 00:00:00 2001 From: Cade Ekblad-Frank Date: Thu, 16 Jan 2020 14:08:05 -0600 Subject: [PATCH] Address code review: * Update basic benchmark example * Clarify warm up example * Add manpage to generated tarballs and debs (bit of YOLO here, need to spin an instance to verify build output but the additions as modeled from fd are innocuous) --- ci/before_deploy.bash | 7 ++++++- doc/hyperfine.1 | 8 ++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ci/before_deploy.bash b/ci/before_deploy.bash index c072ab0..e9eb031 100755 --- a/ci/before_deploy.bash +++ b/ci/before_deploy.bash @@ -23,7 +23,8 @@ pack() { cp "target/$TARGET/release/$PROJECT_NAME" "$tempdir/$package_name/" strip "$tempdir/$package_name/$PROJECT_NAME" - # readme and license + # manpage, readme and license + cp "doc/$PROJECT_NAME.1" "$tempdir/$package_name" cp README.md "$tempdir/$package_name" cp LICENSE-MIT "$tempdir/$package_name" cp LICENSE-APACHE "$tempdir/$package_name" @@ -69,6 +70,10 @@ make_deb() { install -Dm755 "target/$TARGET/release/$PROJECT_NAME" "$tempdir/usr/bin/$PROJECT_NAME" strip "$tempdir/usr/bin/$PROJECT_NAME" + # manpage + install -Dm644 "doc/$PROJECT_NAME.1" "$tempdir/usr/share/man/man1/$PROJECT_NAME.1" + gzip --best "$tempdir/usr/share/man/man1/$PROJECT_NAME.1" + # readme and license install -Dm644 README.md "$tempdir/usr/share/doc/$PROJECT_NAME/README.md" install -Dm644 LICENSE-MIT "$tempdir/usr/share/doc/$PROJECT_NAME/LICENSE-MIT" diff --git a/doc/hyperfine.1 b/doc/hyperfine.1 index a77ed43..6ce0d33 100644 --- a/doc/hyperfine.1 +++ b/doc/hyperfine.1 @@ -173,10 +173,10 @@ Print help message. Show version information. .SH EXAMPLES .LP -Basic benchmark of 'find . -iname '*[0-9].jpg'': +Basic benchmark of 'find . -name todo.txt': .RS .nf -\fBhyperfine\fR 'find . -iname '*[0-9].jpg'' +\fBhyperfine\fR 'find . -name todo.txt' .fi .RE .LP @@ -187,8 +187,8 @@ Perform benchmarks for 'sleep 0.2' and 'sleep 3.2' with a minimum 5 runs each: .fi .RE .LP -Perform a benchmark of 'grep' with a warm disk cache by first running the command -3 times: +Perform a benchmark of 'grep' with a warm disk cache by executing 3 runs up front that are not part +of the measurement: .RS .nf \fBhyperfine\fR \fB\-\-warmup\fR 3 'grep -R TODO *'