Skip to content

Commit b686d3d

Browse files
authored
Merge pull request #402 from Mingun/build-benches
Fix broken benchmarks and build them on CI so it will be hard to happened again
2 parents 46b4d1d + 4991dc4 commit b686d3d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/rust.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ jobs:
2424
- uses: actions/checkout@v1
2525
- name: Build
2626
run: cargo build
27+
- name: Build benchmarks
28+
run: cargo bench --no-run
29+
- name: Build benchmarks (compare)
30+
working-directory: compare
31+
run: cargo bench --no-run
2732
- name: Run tests (no features)
2833
env:
2934
LLVM_PROFILE_FILE: coverage/no-features-%p-%m.profraw

benches/bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ fn one_event(c: &mut Criterion) {
202202
.check_comments(false)
203203
.trim_text(true);
204204
match r.read_event(&mut buf) {
205-
Ok(Event::Start(ref e)) => nbtxt += e.unescaped().unwrap().len(),
205+
Ok(Event::Start(ref e)) => nbtxt += e.len(),
206206
something_else => panic!("Did not expect {:?}", something_else),
207207
};
208208

0 commit comments

Comments
 (0)