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

优化judge内存使用 #326

Merged
merged 1 commit into from
Jan 2, 2018
Merged

优化judge内存使用 #326

merged 1 commit into from
Jan 2, 2018

Conversation

yaoxing
Copy link

@yaoxing yaoxing commented Dec 28, 2017

优化judge使用,使内存使用率仅为之前的40分之一

@@ -32,6 +33,10 @@ func (this *Judge) Send(items []*model.JudgeItem, resp *model.SimpleRpcResponse)
// 把当前时间的计算放在最外层,是为了减少获取时间时的系统调用开销
now := time.Now().Unix()
for _, item := range items {
exists := g.FilterMap.Exists(item.Metric)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍, 一直想提交一个pr把不需要报警判断的metric丢掉(轻微强迫症)

这里会不会出现这样的问题:
如果expression里面只定义了tag判断,如each(project=falcon module=judge),数据上报的时候在最这里会不会因为没办法找到metric把数据丢掉,造成expression报警始终不能触发?

谢谢

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expression里面不指定metric是不能生效的,所以不存在你说的问题

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expression的代码我看的不够详细,哈哈,:blush:

@laiwei laiwei merged commit 345e3c9 into open-falcon:master Jan 2, 2018
@mdh67899 mdh67899 mentioned this pull request Jan 2, 2018
@frieda1220
Copy link

请问, agent 收集间隔缩小到10s后 , judge崩溃了。 judge最小收集间隔支持多少

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

Successfully merging this pull request may close these issues.

4 participants