Skip to content

Conversation

@rdhabalia
Copy link
Contributor

Motivation

Avoid creating new list every time when websocket generate metrics.

@rdhabalia rdhabalia added this to the 2.3.1 milestone Mar 8, 2019
@rdhabalia rdhabalia self-assigned this Mar 8, 2019
Copy link
Contributor

@jai1 jai1 left a comment

Choose a reason for hiding this comment

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

All methods are synchronized - not sure if we still need the tempMetricsCollection, I mean why can't we just clear and repopulate metricsCollection

@rdhabalia
Copy link
Contributor Author

I mean why can't we just clear and repopulate metricsCollection

That's true. We can now remove synchronization on getMetrics method. let me fix it.

Copy link
Contributor

@jai1 jai1 left a comment

Choose a reason for hiding this comment

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

Don't we need metricsCollection to be volatile in order to remove synchronized.

@merlimat merlimat merged commit 0b419df into apache:master Mar 9, 2019
merlimat pushed a commit that referenced this pull request Mar 29, 2019
…cs generator (#3792)

* [pulsar-webscoket] avoid creating temp list of metrics on every-metrics generator

* fix non-sync getMetrics
@merlimat
Copy link
Contributor

merlimat commented Apr 1, 2019

Merged in 2.3.1 at
449f2f5

@rdhabalia rdhabalia deleted the ws_perf branch April 1, 2019 18:22
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.

4 participants