admin 管理员组

文章数量: 1086019


2023年12月18日发(作者:linux vim 保存并退出)

详细结果:测试环境:centos 6.3 64bitphp 7.2java 1.86python 3.4.8

======================Create total use 1973.850796Real create time 28.166692======================Real create speed 341735.834652 q/s======================Real Row count 9625568======================95 use 1.233148

Query Speed 77.038604 q/sAvg query time use 0.012981 s======================root 25053 73.9 94.0 17911268 7703228 pts/1 Sl+ 14:54 4:10 /usr/local/lib/erlang/erts-8.1/bin/ -- -root/usr/local/lib/erlang -progname erl -- -home /root -- -noshell -s erlang_list_dict_test test -s init stop======================Erlang&进程字典+map 500万数据测试============================================Create total use 159.719715Real create time 15.408685======================Real create speed 324492.323647 q/s======================Real Row count 5000000======================99 use 0.000510

Query Speed 194117.647059 q/sAvg query time use 0.000005 s======================root 14961 99.3 39.2 6771772 3213308 pts/0 Sl+ 17:13 2:39 /usr/local/lib/erlang/erts-8.1/bin/ -- -root/usr/local/lib/erlang -progname erl -- -home /root -- -noshell -s erlang_list_dict_test test -s init stop========================================erlang 存储改为ets,500万数据测试结果。======================Create total use 138.476614Real create time 36.483799======================Real create speed 137047.131523 q/s======================Real Row count 5000000======================99 use 0.000488

Query Speed 202868.852459 q/sAvg query time use 0.000005 s======================root 16029 99.1 33.0 5783256 2706632 pts/0 Sl+ 18:11 2:19 /usr/local/lib/erlang/erts-8.1/bin/ -- -root/usr/local/lib/erlang -progname erl -- -home /root -- -noshell -s erlang_list_dict_test test -s init stop

//var value data

n("Rd_max=", max_rd, ", row_num=", row_num)

var count_repeat, real_count int = 0, 0 var real_create_ts,_start_ts, time_use float64 = 0 , 0 , 0 start_ts := GetTimestampInMicro() for i := 0; i < row_num; i++ { var d data var name string rd = getRd() //31n(max_rd) + 1 //n("Rand=" , rd) = rd

str := (rd) name = Md5(str) = name _, ok := datas[name]

if ok{ count_repeat ++ }else{ _start_ts = GetTimestampInMicro() datas[name] = d real_create_ts += GetTimestampInMicro() - _start_ts real_count ++ }

if rd % row_num <100{ search_key_sli=append(search_key_sli, name) } } time_use = GetTimestampInMicro() - start_ts //real_count := len(datas)

n("Repeat=", count_repeat) n("Real count by len=", len(datas))

("======================n") ("Create total use %.6fn", time_use) ("Real create time %.6fn", real_create_ts) ("======================n") ("Real create speed %.6f q/sn", float64(real_count)/real_create_ts) ("======================n") ("Real Row count %dn", real_count) ("======================n")

var item string start_ts = GetTimestampInMicro() for _, item = range search_key_sli { ("=> name= %sn", datas[item].name)

} time_use = GetTimestampInMicro() - start_ts

("%d use %.6fn", len(search_key_sli), time_use) ("Query Speed %.6f q/sn", float64(len(search_key_sli))/time_use) ("Avg query time use %.6f sn", time_use/float64(len(search_key_sli))) ("======================n")

(on(120)*)}


本文标签: 结果 退出 进程 保存 字典