Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

允许BCP的用户调整性能参数 #10

Open
Atry opened this issue Sep 22, 2014 · 2 comments
Open

允许BCP的用户调整性能参数 #10

Atry opened this issue Sep 22, 2014 · 2 comments
Assignees

Comments

@Atry
Copy link
Contributor

Atry commented Sep 22, 2014

目前BCP的所有性能参数都在 https://github.com/qifun/scala-bcp/blob/master/src/main/scala/com/qifun/bcp/Bcp.scala 中作为全局常量存在,所以BCP的用户无法修改性能参数。

这些性能参数应当改为BcpSession中的protected def,供不同需求的游戏以及测试用例修改。

例如:

protected def heartBeatDelay = 3.seconds
@Atry
Copy link
Contributor Author

Atry commented Sep 22, 2014

主要原因是在评测中发现心跳包占用开销比例较大。如果某个游戏对实时性要求不高,应增加心跳包的发送间隔。

@Atry
Copy link
Contributor Author

Atry commented Sep 22, 2014

增加了一条例外规则,以允许给这种非final属性提供默认值。

https://bitbucket.org/qforce/qforce.bitbucket.org/wiki/%E7%BC%96%E7%A0%81%E8%A7%84%E8%8C%83#markdown-header-_2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants