pub fn new() -> ProcessCollector {
        let pid = unsafe { libc::getpid() };

        let mut descs = Vec::new();

        let threads =
            Gauge::with_opts(Opts::new("process_threads", "Number of OS threads.")).unwrap();
        descs.extend(threads.desc().into_iter().cloned());

        ProcessCollector {
            pid,
            descs,
            threads,
        }
    }
/// Creates a `ProcessCollector` for this process.
Creates a `ProcessCollector` for this process.
Creates a ` ProcessCollector ` for this process .
pub fn new() -> ProcessCollector {
        let pid = unsafe { libc::getpid() };
        let mut descs = Vec::new();
        let threads =
            Gauge::with_opts(Opts::new("process_threads", "Number of OS threads.")).unwrap();
        descs.extend(threads.desc().into_iter().cloned());
        ProcessCollector {
            pid,
            descs,
            threads,
        }
    }
pub fn new ( ) -> ProcessCollector { let pid = unsafe { libc :: getpid ( ) } ; let mut descs = Vec :: new ( ) ; let threads = Gauge :: with_opts ( Opts :: new ( " " , " " ) ) . unwrap ( ) ; descs . extend ( threads . desc ( ) . into_iter ( ) . cloned ( ) ) ; ProcessCollector { pid , descs , threads , } }
Creates a `ProcessCollector` for this process.
Creates a ` ProcessCollector ` for this process .