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

[#9052] Improve AlarmJob performance #9077

Merged
merged 1 commit into from
Jul 29, 2022

Conversation

smilu97
Copy link
Contributor

@smilu97 smilu97 commented Jul 27, 2022

Changes

  • DataCollectors do not collect agents themselves, but require to caller
    • AlarmProcessor collects required agents instead of DataCollector
  • AlarmReader does not initialize DataCollector, and AlarmChecker, but AlarmProcess does
  • Chunk of AlarmJob is changed from AlarmChecker into Application, AppAlarmChecker
  • AlarmWriter retrieves AppAlarmChecker instead of AlarmChecker
  • AlarmDao queries all distinct application ids which has at least one alarm rule

AppAlarmChecker

List of AlarmChecker, which is all related to the same application.

@codecov
Copy link

codecov bot commented Jul 27, 2022

Codecov Report

Merging #9077 (a1b5b00) into master (a66193c) will increase coverage by 0.01%.
The diff coverage is 73.94%.

❗ Current head a1b5b00 differs from pull request most recent head 691cf0e. Consider uploading reports for the commit 691cf0e to get more accurate results

@@             Coverage Diff              @@
##             master    #9077      +/-   ##
============================================
+ Coverage     39.78%   39.79%   +0.01%     
- Complexity    11828    11844      +16     
============================================
  Files          3370     3371       +1     
  Lines         91009    91088      +79     
  Branches      10101    10111      +10     
============================================
+ Hits          36205    36249      +44     
- Misses        51706    51735      +29     
- Partials       3098     3104       +6     
Impacted Files Coverage Δ
...orp/pinpoint/batch/alarm/DataCollectorFactory.java 0.00% <0.00%> (ø)
...corp/pinpoint/web/alarm/DataCollectorCategory.java 0.00% <0.00%> (ø)
...ercorp/pinpoint/web/dao/memory/MemoryAlarmDao.java 42.59% <0.00%> (-4.35%) ⬇️
...avercorp/pinpoint/web/dao/mysql/MysqlAlarmDao.java 0.00% <0.00%> (ø)
...vercorp/pinpoint/web/service/AlarmServiceImpl.java 0.00% <0.00%> (ø)
...batch/alarm/collector/DataSourceDataCollector.java 81.63% <33.33%> (-4.09%) ⬇️
...om/navercorp/pinpoint/batch/alarm/AlarmWriter.java 71.18% <74.28%> (+3.61%) ⬆️
...om/navercorp/pinpoint/batch/alarm/AlarmReader.java 90.00% <92.85%> (-2.86%) ⬇️
...navercorp/pinpoint/batch/alarm/AlarmProcessor.java 96.29% <96.29%> (+96.29%) ⬆️
...batch/alarm/collector/AgentEventDataCollector.java 92.00% <100.00%> (-0.60%) ⬇️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a66193c...691cf0e. Read the comment docs.

@smilu97 smilu97 force-pushed the #9052_improve_alarm_job branch 3 times, most recently from 5f5bc71 to bf66505 Compare July 28, 2022 16:51
@smilu97 smilu97 force-pushed the #9052_improve_alarm_job branch from bf66505 to 691cf0e Compare July 29, 2022 04:08
@smilu97 smilu97 merged commit 0f49fdf into pinpoint-apm:master Jul 29, 2022
@smilu97 smilu97 deleted the #9052_improve_alarm_job branch July 29, 2022 04:13
@emeroad emeroad added this to the 2.5.0 milestone Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AlarmJob takes too much time when the number of inactive agents explodes
2 participants