[][src]Function nom_tracable::cumulative_histogram

pub fn cumulative_histogram()

Show cumulative histogram of parser call count.

The call count includes the counts of children parsers.

The statistics information to generate histogram is reset at each parser call. Therefore cumulative_histogram should be called before next parser call. The information is thread independent because it is stored at thread local storage.

    let ret = term(LocatedSpan::new_extra("1", TracableInfo::new()));
    cumulative_histogram(); // Show cumulative histogram of "1" parsing

    let ret = term(LocatedSpan::new_extra("11", TracableInfo::new()));
    cumulative_histogram(); // Show cumulative histogram of "11" parsing