Permalink
Browse files

Fix the benchs

  • Loading branch information...
1 parent 79edf05 commit 6c395fdf8c3b3f3e41601e0fae3314f8de9fac6b @wichtounet committed Apr 27, 2012
Showing with 11 additions and 8 deletions.
  1. +8 −5 src/Results.cpp
  2. +3 −3 src/bench.cpp
View
@@ -37,13 +37,16 @@ void Results::compute_stats(){
auto data = it->second;
for(unsigned int i = 0; i < data.size(); ++i){
- unsigned long sum = 0;
+ //If it's not the case, max has been configured too high
+ if(data[i].size() > 0){
+ unsigned long sum = 0;
- for(auto j : data[i]){
- sum += j;
- }
+ for(auto j : data[i]){
+ sum += j;
+ }
- stats[impl].push_back(sum / data[i].size());
+ stats[impl].push_back(sum / data[i].size());
+ }
}
++it;
View
@@ -244,9 +244,9 @@ void skewed_bench(unsigned int range){
void skewed_bench(){
skewed_bench(2000);
- skewed_bench(20000);
- skewed_bench(200000);
- skewed_bench(std::numeric_limits<int>::max()); //Key in {0, 2^32}
+ //skewed_bench(20000);
+ //skewed_bench(200000);
+ //skewed_bench(std::numeric_limits<int>::max()); //Key in {0, 2^32}
}
unsigned long get_duration(Clock::time_point t0, Clock::time_point t1){

0 comments on commit 6c395fd

Please sign in to comment.