fosslim 0.0.2

A License matcher for the FOSS licenses;
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![feature(test)]
#![cfg(test)]

extern crate test;
extern crate fosslim;

use std::fs::File;
use test::Bencher;
use fosslim::document;

#[bench]
fn test_bench_from_json_file(b: &mut Bencher){
    // ~ 2.08M ns without BufReader, ~1M with BufReader;
    b.iter(||{
        let fp = File::open("tests/fixtures/licenses/MIT.json").expect("Failed to open test file");
        document::parse_from_file(fp).expect("Failed to parse from test file");
    })
}