mirror of
https://codeberg.org/demostf/parser.git
synced 2026-06-03 10:14:06 +02:00
fix benches
This commit is contained in:
parent
826190419b
commit
8bd4eabae0
3 changed files with 10 additions and 5 deletions
|
|
@ -26,7 +26,7 @@ impl MessageHandler for SendPropAnalyser {
|
|||
false
|
||||
}
|
||||
|
||||
fn into_output(&self, state: &ParserState) -> Self::Output {
|
||||
fn into_output(self, state: &ParserState) -> Self::Output {
|
||||
state
|
||||
.send_tables
|
||||
.iter()
|
||||
|
|
@ -43,7 +43,9 @@ fn flatten_bench(input_file: &str, b: &mut Bencher) {
|
|||
let file = fs::read(input_file).expect("Unable to read file");
|
||||
let demo = Demo::new(file);
|
||||
let stream = demo.get_stream();
|
||||
let (_, send_tables) = DemoParser::new_with_analyser(stream.clone(), SendPropAnalyser).unwrap();
|
||||
let (_, send_tables) = DemoParser::new_with_analyser(stream.clone(), SendPropAnalyser)
|
||||
.parse()
|
||||
.unwrap();
|
||||
b.iter(|| {
|
||||
let flat: Vec<_> = send_tables
|
||||
.iter()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue