Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于info命令latest_fork_usec解释的疑问 #42

Open
BrotherGao opened this issue Aug 8, 2018 · 0 comments
Open

关于info命令latest_fork_usec解释的疑问 #42

BrotherGao opened this issue Aug 8, 2018 · 0 comments

Comments

@BrotherGao
Copy link

Hi,@huangz1990
server目录下,info.html文件中写到latest_fork_usec为最近一次fork()操作耗费的毫秒数。
据我所知,单位应该是微秒数。latest_fork_usec对应代码里面的变量server.stat_fork_time,具体参见如下代码段:
server.stat_fork_time = ustime()-start;

/* Return the UNIX time in microseconds */
long long ustime(void) {
    struct timeval tv;
    long long ust;

    gettimeofday(&tv, NULL);
    ust = ((long long)tv.tv_sec)*1000000;
    ust += tv.tv_usec;
    return ust;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant