-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Test arguments printed with 32 bit precision #714
Comments
Sounds about right. PR welcome :)
…On Mon, Oct 22, 2018 at 6:47 PM Miro Knejp ***@***.***> wrote:
The arguments passed to benchmarks are of type int64_t however when they
get reported they get truncated to 32 bits. The following is output where
the argument keeps increasing beyond int precision and is printed
incorrectly (but the benchmark does the right thing).
baseline_push_back/std::vector<int>/67108864/manual_time 33079613 ns 32812500 ns 20
baseline_push_back/std::vector<int>/134217728/manual_time 71565844 ns 71428571 ns 7
baseline_push_back/std::vector<int>/536870912/manual_time 539197109 ns 531250000 ns 1
baseline_push_back/std::vector<int>/1073741824/manual_time 914751775 ns 890625000 ns 1
baseline_push_back/std::vector<int>/-2147483648/manual_time 1806131008 ns 1796875000 ns 1
baseline_push_back/std::vector<int>/0/manual_time 3629563138 ns 3625000000 ns 1
I think the problem is that
https://github.com/google/benchmark/blob/edc77a3669026eddc380721d5a3cdccd752b76cb/src/benchmark_register.cc#L185
should use the %lld format specifier instead.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#714>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAfIMhrlXVyZHWJxNYhSkRupkqKEo0Rrks5ungSdgaJpZM4Xz17s>
.
|
Is |
LebedevRI
added a commit
to LebedevRI/benchmark
that referenced
this issue
Nov 26, 2018
LebedevRI
added a commit
to LebedevRI/benchmark
that referenced
this issue
Nov 26, 2018
LebedevRI
added a commit
to LebedevRI/benchmark
that referenced
this issue
Nov 26, 2018
LebedevRI
added a commit
to LebedevRI/benchmark
that referenced
this issue
Nov 26, 2018
LebedevRI
added a commit
to LebedevRI/benchmark
that referenced
this issue
Nov 26, 2018
EricWF
pushed a commit
that referenced
this issue
Nov 27, 2018
EricWF
pushed a commit
to efcs/benchmark
that referenced
this issue
Nov 29, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The arguments passed to benchmarks are of type
int64_t
however when they get reported they get truncated to 32 bits. The following is output where the argument keeps increasing beyondint
precision and is printed incorrectly (but the benchmark does the right thing).I think the problem is that
benchmark/src/benchmark_register.cc
Line 185 in edc77a3
should use the
%lld
format specifier instead.The text was updated successfully, but these errors were encountered: