我有使用Go(httprouter/gokil),當我使用siege -b -t10s -c255測試它,它顯示了這樣的事情(最好成績)編寫的Web應用程序服務器: POST API (read only query to database, cache query result to RAM)
Transaction rate: 4251.38 trans/sec (local witho
我正在試驗謂詞。我試圖在分佈式系統中實現序列化問題的謂詞。我寫了一個簡單的例子,其中測試函數只返回true。我正在測量頭頂,我偶然發現了這個有趣的問題。訪問for循環中的數組比直接訪問慢10倍。 class Test {
public boolean test(Object o) { return true; }
}
long count = 1000000000l;
Test[
使用Benchmark ips我做了這個測試。如果我在剛剛測試過的地方出錯,請糾正我。請注意,96是我的數據庫中第一個用戶的ID。 Benchmark.ips do |x|
x.report("first") do
User.first
end
x.report("where") do
User.where(id: 96).limit(1)