This is an automated email from the ASF dual-hosted git repository. mgrigorov pushed a commit to branch rust-improve-cpu-and-memory-usage in repository https://gitbox.apache.org/repos/asf/avro.git
commit 1a5dec97c50a38335f538413472dcb58cd5dc6e5 Author: Martin Tzvetanov Grigorov <[email protected]> AuthorDate: Thu Jun 2 16:22:37 2022 +0300 Print the schemas with pretty-print Signed-off-by: Martin Tzvetanov Grigorov <[email protected]> --- lang/rust/avro/examples/benchmark.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lang/rust/avro/examples/benchmark.rs b/lang/rust/avro/examples/benchmark.rs index 1829d2171..4ba49d068 100644 --- a/lang/rust/avro/examples/benchmark.rs +++ b/lang/rust/avro/examples/benchmark.rs @@ -115,8 +115,8 @@ fn main() -> anyhow::Result<()> { let small_schema = Schema::parse_str(raw_small_schema)?; let big_schema = Schema::parse_str(raw_big_schema)?; - println!("{:?}", small_schema); - println!("{:?}", big_schema); + println!("{:#?}", small_schema); + println!("{:#?}", big_schema); let mut small_record = Record::new(&small_schema).unwrap(); small_record.put("field", "foo"); @@ -139,8 +139,7 @@ fn main() -> anyhow::Result<()> { big_record.put("address", address); let big_record = big_record.into(); - println!(); - println!("Count\t\tRuns\t\tBig/Small\tTotal write secs\tTotal read secs"); + println!("\nCount\t\tRuns\t\tBig/Small\tTotal write secs\tTotal read secs"); benchmark(&small_schema, &small_record, "Small", 10_000, 1)?; benchmark(&big_schema, &big_record, "Big", 10_000, 1)?;
