項目地址:
http://code.google.com/p/libbenchmark
目前我把這個放到google上了,但擔心訪問它不夠穩定,
比如得到svn check out密碼的時候就必須翻GFW,
誰有好的放代碼的地方,請告訴我一聲,謝了.
編譯出來後有兩部分,一個是命令行工具,一個是動態庫
- benchmark(command line):
It could exec a command in multi-process(num->P) && multi-thread(num->T),
so you get P*T instance concurrently.It's used to be a performance generator to do performance test.
這是一個命令行工具,它可以在多進程多線程內執行命令,從而實現並行的執行,這個常常用來做併發測試或者性能測試, 比如它配合curl或者wget之類的http工具就能實現對http服務器的性能測試. 它是一個調度程序,不是具體執行者,curl或者wget之類的工具纔是.
- libbenchmark:
It's a share object of benchmark.
You could use the function benchmark() to do the same thing like the command line benchmark.
這是benchmark的動態庫,可以通過使用benchmark方法實現你的函數併發調用,你要注意你的代碼是否線程安全.