Compare commits

...

3 Commits

Author SHA1 Message Date
dependabot[bot]
5493cf5039 Bump softprops/action-gh-release from 1 to 2
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-12 21:33:20 +01:00
Hamir Mahal
6c774103d9 refactor: replace repeated string allocation
on each iteration with one `String` creation in
`fold`, for efficiency
2024-03-12 21:32:40 +01:00
Everett Pompeii
09c39d8989 Add Bencher as sponsor 2024-03-12 19:53:24 +01:00
5 changed files with 114 additions and 5 deletions

View File

@ -326,7 +326,7 @@ jobs:
echo "IS_RELEASE=${IS_RELEASE}" >> $GITHUB_OUTPUT
- name: Publish archives and packages
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: steps.is-release.outputs.IS_RELEASE
with:
files: |

View File

@ -10,6 +10,22 @@ A command-line benchmarking tool.
![hyperfine](https://i.imgur.com/z19OYxE.gif)
## Sponsors
A special *thank you* goes to our biggest <a href="doc/sponsors.md">sponsor</a>:
<a href="https://bencher.dev/hyperfine/?utm_source=github&utm_medium=referral&utm_campaign=hyperfine&utm_content=wordmark">
<img src="doc/sponsors/bencher_wordmark.svg" width="200" alt="🐰 Bencher">
<br>
<strong>Continuous Benchmarking: Catch performance regressions in CI</strong>
</a>
<br>
<a href="https://bencher.dev/hyperfine/?utm_source=github&utm_medium=referral&utm_campaign=hyperfine&utm_content=copy">
<sub>Track the results of your <code>hyperfine</code> benchmarks over time with Bencher.</sub>
<br>
<sup>Detect and prevent performance regressions before they make it to production.</sup>
</a>
## Features
* Statistical analysis across multiple runs.

12
doc/sponsors.md Normal file
View File

@ -0,0 +1,12 @@
## Sponsors
`hyperfine` development is sponsored by many individuals and companies. Thank you very much!
Please note, that being sponsored does not affect the individuality of the `hyperfine`
project or affect the maintainers' actions in any way.
We remain impartial and continue to assess pull requests solely on merit - the
features added, bugs solved, and effect on the overall complexity of the code.
No issue will have a different priority based on sponsorship status of the
reporter.
If you want to see our biggest sponsors, check the top of [`README.md`](../README.md#sponsors).

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -59,10 +59,11 @@ impl<'a> Command<'a> {
}
pub fn get_name_with_unused_parameters(&self) -> String {
let parameters = self
.get_unused_parameters()
.map(|(parameter, value)| format!("{} = {}, ", parameter, value.to_string()))
.collect::<String>();
let parameters =
self.get_unused_parameters()
.fold(String::new(), |output, (parameter, value)| {
output + &format!("{} = {}, ", parameter, value.to_string())
});
let parameters = parameters.trim_end_matches(", ");
let parameters = if parameters.is_empty() {
"".into()