-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
16 changed files
with
155 additions
and
61 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 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 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
Oops, something went wrong.