t_trace 0.1.3

High-performance, command-line statistics tracker for your shell
Documentation
1
2
3
4
5
6
7
8
use anyhow::Result;
use std::path::PathBuf;

pub fn get_socket_path() -> Result<PathBuf> {
    let uid = unsafe { libc::getuid() };
    let path = PathBuf::from(format!("/tmp/t_trace.{}.sock", uid));
    Ok(path)
}