Skip to content

Commit

Permalink
Fix benches (tafia#112)
Browse files Browse the repository at this point in the history
* fix benches

* add benches to travis

* remove generate bench script

* update comparison benchmark, using build script

* do not test comparative bench

* rustfmt

* update run_test so rustfmt is ran after the code is generated
  • Loading branch information
tafia authored Aug 15, 2018
1 parent 465a7f6 commit 85cff16
Show file tree
Hide file tree
Showing 18 changed files with 688 additions and 3,600 deletions.
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ before_script:
- rustup component add rustfmt-preview

script:
- if [[ $(rustup show active-toolchain) == stable* ]]; then cargo fmt --all -- --check; fi;
- cargo build
- cargo test
- cargo build -p pb-rs -p quick-protobuf
- ./run_test.sh
- if [[ $(rustup show active-toolchain) == stable* ]]; then cargo fmt -ppb-rs -pquick-protobuf -- --check; fi;
- cargo test -p pb-rs -p quick-protobuf
- if [[ $(rustup show active-toolchain) == nightly* ]]; then cargo bench -p quick-protobuf; fi;
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
members = [
"quick-protobuf",
"pb-rs",
"quick-protobuf/benches/rust-protobuf",
]
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ install:
build: false

test_script:
- cargo build
- cargo test
- cargo build -p pb-rs -p quick-protobuf
- sh run_test.sh
- cargo test -p pb-rs -p quick-protobuf
1 change: 1 addition & 0 deletions quick-protobuf/benches/perftest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use std::cmp::min;
use perftest_data::*;

use quick_protobuf::message::MessageWrite;
use quick_protobuf::MessageRead;
use quick_protobuf::{BytesReader, Reader, Writer};
use test::{black_box, Bencher};

Expand Down
4 changes: 0 additions & 4 deletions quick-protobuf/benches/perftest_data/generate_mod.sh

This file was deleted.

Loading

0 comments on commit 85cff16

Please sign in to comment.