Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
criterion 0.2.0 - Docs.rs
[go: Go Back, main page]

criterion 0.2.0

Statistics-driven micro-benchmarking library
use std::io;
use std::path::PathBuf;

use failure::Error;

#[derive(Debug, Fail)]
#[fail(display = "Failed to access file {:?}: {}", path, inner)]
pub struct AccessError {
    pub path: PathBuf,
    #[cause] pub inner: io::Error,
}

pub type Result<T> = ::std::result::Result<T, Error>;

pub(crate) fn log_error(e: &Error) {
    error!("error: {}", e.cause());
    for cause in e.causes() {
        error!("caused by: {}", cause);
    }

    debug!("backtrace: {}", e.backtrace());
}