Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8E816200AEE for ; Wed, 4 May 2016 02:41:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8DA761609F6; Wed, 4 May 2016 02:41:43 +0200 (CEST) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E19FA1609F5 for ; Wed, 4 May 2016 02:41:42 +0200 (CEST) Received: (qmail 41846 invoked by uid 500); 4 May 2016 00:41:42 -0000 Mailing-List: contact commits-help@parquet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@parquet.apache.org Delivered-To: mailing list commits@parquet.apache.org Received: (qmail 41837 invoked by uid 99); 4 May 2016 00:41:42 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 May 2016 00:41:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D33DFDFBAB; Wed, 4 May 2016 00:41:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: wesm@apache.org To: commits@parquet.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: parquet-cpp git commit: PARQUET-597: Add data rates to benchmark output Date: Wed, 4 May 2016 00:41:41 +0000 (UTC) archived-at: Wed, 04 May 2016 00:41:43 -0000 Repository: parquet-cpp Updated Branches: refs/heads/master ff14d97ef -> b7b7fa22f PARQUET-597: Add data rates to benchmark output Author: Uwe L. Korn Closes #94 from xhochy/parquet-597 and squashes the following commits: 6442eb7 [Uwe L. Korn] PARQUET-597: Add data rates to benchmark output Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/b7b7fa22 Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/b7b7fa22 Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/b7b7fa22 Branch: refs/heads/master Commit: b7b7fa22f05ede2593e93c0f32564235e4404e83 Parents: ff14d97 Author: Uwe L. Korn Authored: Tue May 3 17:41:34 2016 -0700 Committer: Wes McKinney Committed: Tue May 3 17:41:34 2016 -0700 ---------------------------------------------------------------------- src/parquet/column/column-io-benchmark.cc | 13 +++++++++++++ src/parquet/encodings/encoding-benchmark.cc | 4 ++++ 2 files changed, 17 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/b7b7fa22/src/parquet/column/column-io-benchmark.cc ---------------------------------------------------------------------- diff --git a/src/parquet/column/column-io-benchmark.cc b/src/parquet/column/column-io-benchmark.cc index 8007ed5..3bc2582 100644 --- a/src/parquet/column/column-io-benchmark.cc +++ b/src/parquet/column/column-io-benchmark.cc @@ -44,6 +44,17 @@ std::shared_ptr Int64Schema(Repetition::type repetition) { node, repetition != Repetition::REQUIRED, repetition == Repetition::REPEATED); } +void SetBytesProcessed(::benchmark::State& state, Repetition::type repetition) { + int64_t bytes_processed = state.iterations() * state.range_x() * sizeof(int64_t); + if (repetition != Repetition::REQUIRED) { + bytes_processed += state.iterations() * state.range_x() * sizeof(int16_t); + } + if (repetition == Repetition::REPEATED) { + bytes_processed += state.iterations() * state.range_x() * sizeof(int16_t); + } + state.SetBytesProcessed(state.iterations() * state.range_x() * sizeof(int16_t)); +} + template static void BM_WriteInt64Column(::benchmark::State& state) { format::ColumnChunk metadata; @@ -60,6 +71,7 @@ static void BM_WriteInt64Column(::benchmark::State& state) { values.size(), definition_levels.data(), repetition_levels.data(), values.data()); writer->Close(); } + SetBytesProcessed(state, repetition); } BENCHMARK_TEMPLATE(BM_WriteInt64Column, Repetition::REQUIRED)->Range(1024, 65536); @@ -103,6 +115,7 @@ static void BM_ReadInt64Column(::benchmark::State& state) { repetition_levels_out.data(), values_out.data(), &values_read); } } + SetBytesProcessed(state, repetition); } BENCHMARK_TEMPLATE(BM_ReadInt64Column, Repetition::REQUIRED) http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/b7b7fa22/src/parquet/encodings/encoding-benchmark.cc ---------------------------------------------------------------------- diff --git a/src/parquet/encodings/encoding-benchmark.cc b/src/parquet/encodings/encoding-benchmark.cc index 92bc29e..f9265bd 100644 --- a/src/parquet/encodings/encoding-benchmark.cc +++ b/src/parquet/encodings/encoding-benchmark.cc @@ -31,6 +31,7 @@ static void BM_PlainEncodingBoolean(::benchmark::State& state) { InMemoryOutputStream dst; encoder.Encode(values, values.size(), &dst); } + state.SetBytesProcessed(state.iterations() * state.range_x() * sizeof(bool)); } BENCHMARK(BM_PlainEncodingBoolean)->Range(1024, 65536); @@ -49,6 +50,7 @@ static void BM_PlainDecodingBoolean(::benchmark::State& state) { decoder.Decode(output, values.size()); } + state.SetBytesProcessed(state.iterations() * state.range_x() * sizeof(bool)); delete[] output; } @@ -62,6 +64,7 @@ static void BM_PlainEncodingInt64(::benchmark::State& state) { InMemoryOutputStream dst; encoder.Encode(values.data(), values.size(), &dst); } + state.SetBytesProcessed(state.iterations() * state.range_x() * sizeof(int64_t)); } BENCHMARK(BM_PlainEncodingInt64)->Range(1024, 65536); @@ -78,6 +81,7 @@ static void BM_PlainDecodingInt64(::benchmark::State& state) { decoder.SetData(values.size(), buf->data(), buf->size()); decoder.Decode(values.data(), values.size()); } + state.SetBytesProcessed(state.iterations() * state.range_x() * sizeof(int64_t)); } BENCHMARK(BM_PlainDecodingInt64)->Range(1024, 65536);