-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21f531a
commit dff1856
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
use std::io; | ||
use std::time::Instant; | ||
|
||
use mzdata::MzMLReader; | ||
use mzdata::io::PreBufferedStream; | ||
|
||
|
||
|
||
fn main() -> io::Result<()> { | ||
let start = Instant::now(); | ||
let stream = io::stdin(); | ||
let stream = PreBufferedStream::new(stream)?; | ||
|
||
let reader = MzMLReader::new(stream); | ||
let spectra: Vec<_> = reader.collect(); | ||
eprintln!("Read {} spectra", spectra.len()); | ||
let end = Instant::now(); | ||
eprintln!("Read {} spectra in {:0.3?}", spectra.len(), end - start); | ||
assert!(spectra.len() > 0); | ||
|
||
Ok(()) | ||
} |