-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gate logging behind an opt-in feature. #31
Merged
Merged
Conversation
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
$ cargo bench --features enable_logging running 8 tests test compress_65536 ... bench: 4,330,374 ns/iter (+/- 79,850) test compress_empty ... bench: 2,221 ns/iter (+/- 370) test compress_hello ... bench: 3,217 ns/iter (+/- 225) test decompress_after_compress_65536 ... bench: 5,835,689 ns/iter (+/- 96,176) test decompress_after_compress_empty ... bench: 10,845 ns/iter (+/- 553) test decompress_after_compress_hello ... bench: 12,425 ns/iter (+/- 689) test decompress_big_file ... bench: 9,750,036 ns/iter (+/- 460,925) test decompress_huge_dict ... bench: 12,619 ns/iter (+/- 424) $ cargo bench running 8 tests test compress_65536 ... bench: 2,377,692 ns/iter (+/- 15,781) test compress_empty ... bench: 2,067 ns/iter (+/- 64) test compress_hello ... bench: 2,733 ns/iter (+/- 358) test decompress_after_compress_65536 ... bench: 3,815,474 ns/iter (+/- 72,097) test decompress_after_compress_empty ... bench: 10,760 ns/iter (+/- 5,275) test decompress_after_compress_hello ... bench: 11,865 ns/iter (+/- 75) test decompress_big_file ... bench: 7,416,332 ns/iter (+/- 40,416) test decompress_huge_dict ... bench: 12,082 ns/iter (+/- 238)
bors r+ |
bors bot
added a commit
that referenced
this pull request
Mar 5, 2020
31: Gate logging behind an opt-in feature. r=gendx a=gendx ### Pull Request Overview This pull request fixes #18. There is a new optional feature, `enable_logging` to turn on logging. When turned off (now default), the `lzma_trace!` and similar macros are no-ops. This also removes the need for the `log` dependency (and all of its transitive dependencies) when turned off. ### Benchmarks ``` $ cargo bench --features enable_logging running 8 tests test compress_65536 ... bench: 4,330,374 ns/iter (+/- 79,850) test compress_empty ... bench: 2,221 ns/iter (+/- 370) test compress_hello ... bench: 3,217 ns/iter (+/- 225) test decompress_after_compress_65536 ... bench: 5,835,689 ns/iter (+/- 96,176) test decompress_after_compress_empty ... bench: 10,845 ns/iter (+/- 553) test decompress_after_compress_hello ... bench: 12,425 ns/iter (+/- 689) test decompress_big_file ... bench: 9,750,036 ns/iter (+/- 460,925) test decompress_huge_dict ... bench: 12,619 ns/iter (+/- 424) $ cargo bench running 8 tests test compress_65536 ... bench: 2,377,692 ns/iter (+/- 15,781) test compress_empty ... bench: 2,067 ns/iter (+/- 64) test compress_hello ... bench: 2,733 ns/iter (+/- 358) test decompress_after_compress_65536 ... bench: 3,815,474 ns/iter (+/- 72,097) test decompress_after_compress_empty ... bench: 10,760 ns/iter (+/- 5,275) test decompress_after_compress_hello ... bench: 11,865 ns/iter (+/- 75) test decompress_big_file ... bench: 7,416,332 ns/iter (+/- 40,416) test decompress_huge_dict ... bench: 12,082 ns/iter (+/- 238) ``` Co-authored-by: G. Endignoux <ggendx@gmail.com>
Canceled |
bors r+ |
Build succeeded |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Overview
This pull request fixes #18. There is a new optional feature,
enable_logging
to turn on logging. When turned off (now default), thelzma_trace!
and similar macros are no-ops.This also removes the need for the
log
dependency (and all of its transitive dependencies) when turned off.Benchmarks