Skip to content

Commit

Permalink
Remove criterion-cycles-per-byte dependency and related benchmark mea…
Browse files Browse the repository at this point in the history
…surement (#995)
  • Loading branch information
orf authored Aug 26, 2023
1 parent c2d1761 commit b28777e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 164 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --manifest-path=native/Cargo.toml --all-features
- name: compile-benchmarks
uses: actions-rs/cargo@v1
with:
command: bench
args: --manifest-path=native/Cargo.toml --no-run

rustfmt:
name: Rustfmt
Expand Down
170 changes: 9 additions & 161 deletions native/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion native/libcst/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ libcst_derive = { path = "../libcst_derive" }

[dev-dependencies]
criterion = { version = "0.4.0", features = ["html_reports"] }
criterion-cycles-per-byte = "0.1"
difference = "2.0.0"

[[bench]]
Expand Down
3 changes: 1 addition & 2 deletions native/libcst/benches/parser_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use std::{
use criterion::{
black_box, criterion_group, criterion_main, measurement::Measurement, BatchSize, Criterion,
};
use criterion_cycles_per_byte::CyclesPerByte;
use itertools::Itertools;
use libcst_native::{
parse_module, parse_tokens_without_whitespace, tokenize, Codegen, Config, Inflate,
Expand Down Expand Up @@ -120,7 +119,7 @@ pub fn parse_into_cst_benchmarks<T: Measurement>(c: &mut Criterion<T>) {

criterion_group!(
name=benches;
config = Criterion::default().with_measurement(CyclesPerByte);
config=Criterion::default();
targets=parser_benchmarks, codegen_benchmarks, inflate_benchmarks, tokenize_benchmarks, parse_into_cst_benchmarks
);
criterion_main!(benches);

0 comments on commit b28777e

Please sign in to comment.