forked from burrowers/garble
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
redesign benchmark to be more useful and realistic
First, join the two benchmarks into one. The previous "cached" benchmark was borderline pointless, as it built the same package with the existing output binary, so it would quickly realise it had nothing to do and take ~100ms. The previous "noncached" benchmark input had no dependencies, so it was only really benchmarking the non-obfuscation of the runtime. All in all, neither benchmark measured obfuscating multiple packages. The new benchmark reuses the "cached" input, but with GOCACHE="*", meaning that we now obfuscate dozens of standard library packages. Each iteration first does a built from scratch, the worst case scenario, and then does an incremental rebuild of just the main package, which is the closest to a best case scenario without being a no-op. Since each iteration now performs both kinds of builds, we include a new "cached-time" metric to report what portion of the "time" metric corresponds to the incremental build. Thus, we can see a clean build takes ~11s, and a cached takes ~0.3s: name time/op Build-16 11.6s ± 1% name bin-B Build-16 5.34M ± 0% name cached-time/op Build-16 326ms ± 5% name sys-time/op Build-16 184ms ±13% name user-time/op Build-16 611ms ± 5% The benchmark is also no logner parallel; see the docs. Note that the old benchmark also reported bin-B incorrectly, as it looked at the binary size of garble itself, not the input program.
- Loading branch information
Showing
5 changed files
with
108 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters