4dc77717
zhouhaihai
压测
|
1
2
3
4
5
6
7
8
9
10
11
12
|
local skynet = require "skynet"
local string_format = string.format
local math_floor = math.floor
function log( msg )
print(string_format("[%s]: %s", os.date("%m%d %H:%M:%S", math_floor(skynet.time())), msg))
end
return {
|
4dc77717
zhouhaihai
压测
|
14
15
16
17
18
19
20
|
host = "127.0.0.1", --服务器地址
port = 12001, -- 服务器端口
online = 100, -- 稳定状态在线人数
inpre = 10, -- 稳定前每秒进入人数 -- 必须小于online数
max = 200, -- 最大玩家数 必须大于 online 数
|
d9c023b8
zhouhaihai
压测
|
28
29
30
31
32
33
34
35
36
|
chat = {weight = 100}, -- 聊天
item = {weight = 100}, -- 物品操作
hero = {weight = 500}, -- 英雄
hang = {weight = 1000}, -- 挂机战斗
tower = {weight = 500}, -- 爬塔
car = {weight = 100}, -- 爬塔
pvp = {weight = 500}, -- pvp
email = {weight = 100}, -- 邮件
adv = {weight = 200}, -- 冒险
|