Created
August 17, 2011 06:33
-
-
Save huacnlee/1150933 to your computer and use it in GitHub Desktop.
redis-search 0.3 Benchmark, 用户昵称搜索(10个字以内)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
redis-search 0.3 Benchmark | |
Core 2 Duo CPU 2.66G, 4G Memory | |
20W 数据 | |
# coding: utf-8 | |
require "benchmark" | |
["的","美丽","云","云儿","花","云儿的"].each do |key| | |
count = RedisSearch::Search.query("Person", key, :limit => 1000000).count | |
puts "="*80 | |
puts "Search #{key} all count:#{count}..." | |
Benchmark.bm do |bm| | |
[1, 10, 100, 1000, 10000].each do |i| | |
bm.report("Search #{i}") do | |
i.times do |n| | |
RedisSearch::Search.query("Person", key, :limit => 20) | |
end | |
end | |
end | |
end | |
end | |
================================================================================ | |
Search 的 all count:5600... | |
user system total real | |
Search 1 0.000000 0.000000 0.000000 ( 0.013436) | |
Search 10 0.010000 0.000000 0.010000 ( 0.017582) | |
Search 100 0.090000 0.010000 0.100000 ( 0.265795) | |
Search 1000 0.430000 0.080000 0.510000 ( 2.152209) | |
Search 10000 4.810000 0.700000 5.510000 ( 20.952217) | |
================================================================================ | |
Search 美丽 all count:456... | |
user system total real | |
Search 1 0.000000 0.000000 0.000000 ( 0.001668) | |
Search 10 0.010000 0.010000 0.020000 ( 0.014248) | |
Search 100 0.040000 0.010000 0.050000 ( 0.144137) | |
Search 1000 0.540000 0.120000 0.660000 ( 1.301681) | |
Search 10000 5.430000 1.230000 6.660000 ( 13.224271) | |
================================================================================ | |
Search 云 all count:1074... | |
user system total real | |
Search 1 0.000000 0.000000 0.000000 ( 0.001033) | |
Search 10 0.000000 0.000000 0.000000 ( 0.007430) | |
Search 100 0.040000 0.010000 0.050000 ( 0.086030) | |
Search 1000 0.490000 0.060000 0.550000 ( 0.917758) | |
Search 10000 4.790000 0.640000 5.430000 ( 9.161982) | |
================================================================================ | |
Search 云儿 all count:16... | |
user system total real | |
Search 1 0.000000 0.000000 0.000000 ( 0.001236) | |
Search 10 0.000000 0.000000 0.000000 ( 0.010758) | |
Search 100 0.040000 0.010000 0.050000 ( 0.088965) | |
Search 1000 0.500000 0.120000 0.620000 ( 0.965457) | |
Search 10000 4.720000 1.170000 5.890000 ( 9.448613) | |
================================================================================ | |
Search 花 all count:1478... | |
user system total real | |
Search 1 0.000000 0.000000 0.000000 ( 0.001275) | |
Search 10 0.010000 0.000000 0.010000 ( 0.008314) | |
Search 100 0.030000 0.010000 0.040000 ( 0.085385) | |
Search 1000 0.500000 0.060000 0.560000 ( 1.018030) | |
Search 10000 4.860000 0.640000 5.500000 ( 10.057470) | |
================================================================================ | |
Search 云儿的 all count:2... | |
user system total real | |
Search 1 0.000000 0.000000 0.000000 ( 0.000657) | |
Search 10 0.000000 0.000000 0.000000 ( 0.006602) | |
Search 100 0.020000 0.010000 0.030000 ( 0.072634) | |
Search 1000 0.250000 0.120000 0.370000 ( 0.670645) | |
Search 10000 2.100000 1.120000 3.220000 ( 6.350150) | |
平均每秒 2000 次搜索请求 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
user system total real
c result:
["Caam Atimon", "C Precanonical", "Caama Laicizer", "Ca Squatarole", "Caam Fallowist", "Caama Rejail", "Caama Delegant", "C Sphenophyllales", "C Quadrifoliolate", "Caama Endolymph"]
'c' word 10 times 0.080000 0.000000 0.080000 ( 0.095804)
a result:
["Aa Knavish", "A Unbehaving", "A Dilettantish", "Aa Galactodendron", "A Attorney", "Aa Cryptolunatic", "Aalii Akindle", "A Mealywing", "Aal Studerite", "Aal Viosterol"]
'a' word 10 times 0.130000 0.000000 0.130000 ( 0.151075)
b result:
["Baa Zadruga", "Baa Jager", "Ba Boronatrocalcite", "B Platinammine", "B Welly", "B Hoplocephalus", "B Gymnospermal", "B Unquote", "B Planktologist", "B Thermotical"]
'b' word 10 times 0.070000 0.010000 0.080000 ( 0.090507)
f result:
["Fabaceous Santalic", "F Iconodulist", "Fa Stomatodaeal", "Fa Bel", "F Annotative", "Fabaceous Strawsmear", "Fabella Jewbush", "F Trichinopoly", "Fabaceae Logical", "Faba Delphinine"]
'f' word 10 times 0.070000 0.000000 0.070000 ( 0.092728)
t result:
["T Dramaticism", "T Pleomastia", "T Broomstick", "T Guglia", "T Rectifiable", "T Monostichous", "T Amole", "T Dressage", "T Straka", "T Sclater"]
't' word 10 times 0.080000 0.000000 0.080000 ( 0.085717)
d result:
["D Blockheadish", "Dab Disasinate", "Dab Quaverous", "Dab Nervulose", "Dab Carbolineum", "Da Icacinaceous", "Da Assess", "D Prayingwise", "D Expatriation", "Daalder Switchback"]
'd' word 10 times 0.070000 0.000000 0.070000 ( 0.083891)
m result:
["M Shapometer", "Ma Granulitis", "Maamselle Dismembered", "Ma Loyalism", "Ma Terfeziaceae", "Maamselle Heptatrema", "M Overfast", "Ma Acquiesce", "M Oncia", "M Petticoaty"]
'm' word 10 times 0.070000 0.010000 0.080000 ( 0.082869)