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

解决win32 X64下的gettimeofday非常缓慢的问题 #51

Merged
merged 7 commits into from
Jul 4, 2017

Conversation

yuangu
Copy link
Contributor

@yuangu yuangu commented Jun 25, 2017

1、文档里增加了win32 X64的配置编译方式(不过这个文件名还是win32, 有点怪怪的)。
2、文档中说使用的cmake 为3.8以上版本是不对的,实际使用发现cmake3.9是编译不了的。
3、win32 x64的getimeofday 的benchmark显示,gettimeofday慢得不是一个等级的。bechmark如下:
gettimeofday_benchmark loop=10000000 cost=5.07226s op=507.226ns/op QPS=1925.3k system_clock_benchmark loop=10000000 cost=0.777856s op=77.7856ns/op QPS=12554.5k steady_clock_benchmark loop=10000000 cost=1.01353s op=101.353ns/op QPS=9635.3k high_resolution_clock_benchmark loop=10000000 cost=1.0262s op=102.62ns/op QPS=9516.34k

参考nginx的gettimeofday(https://github.com/nginx/nginx/blob/f8a9d528df92c7634088e575e5c3d63a1d4ab8ea/src/os/win32/ngx_time.c ):

gettimeofday_benchmark loop=10000000 cost=0.586243s op=58.6243ns/op QPS=16658k
system_clock_benchmark loop=10000000 cost=0.790204s op=79.0204ns/op QPS=12358.4k
steady_clock_benchmark loop=10000000 cost=1.00596s op=100.596ns/op QPS=9707.73k
high_resolution_clock_benchmark loop=10000000 cost=1.00085s op=100.085ns/op QPS=9757.3k

@yuangu yuangu changed the title 一些同步问题。 解决win32 X64下的gettimeofday非常缓慢的问题 Jun 25, 2017
@zieckey
Copy link
Collaborator

zieckey commented Jun 26, 2017

非常感谢。

文档名称可以改为 quick_start_windows_with_visualstudio.md ?
文档的markdown的标题缩进问题,请见下面标注。

最后,能否将5个commits合并一下为一个commits?(可能需要重新开一个PR)。再次感谢。

- git.exe available in your path. You can download and install it from [https://git-for-windows.github.io/]
- vcpkg. You can download and install it from [https://github.com/Microsoft/vcpkg]. Commits c5daa93506b616d253e257488ecc385271238e2a tests OK. Following [https://github.com/Microsoft/vcpkg#quick-start](https://github.com/Microsoft/vcpkg#quick-start) to install [vcpkg]. This document assumes that [vcpkg] is installed at `d:\git\vcpkg`.

#### Install dependent libraries by using vcpkg

Use [vcpkg] to install libevent,glog,gtest,gflags.

## for win_x32:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的标题应该为 #####

@yuangu
Copy link
Contributor Author

yuangu commented Jun 26, 2017

好的

@zieckey zieckey merged commit 35f3935 into Qihoo360:master Jul 4, 2017
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

Successfully merging this pull request may close these issues.

2 participants