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

Metrics performance improvements #157

Merged
merged 16 commits into from
Nov 13, 2024
Merged

Conversation

konraddysput
Copy link
Collaborator

@konraddysput konraddysput commented Nov 5, 2024

Why

Attribute generations .... cost us time. We generated them multiple times during metrics setup AND metrics payload generation. In addition to that we had a situation where we generated attributes twice during single object creation (in the constructor to get an application name and later to get all attributes for payload)

This pull request significantly improves the performance of the metrics system - my internal results give me 2x time reduction. Other parts of our system can also benefit from it - everything that uses our attribute system should retrieve results faster.

ref: BT-2660

@konraddysput konraddysput added the enhancement New feature or request label Nov 5, 2024
@konraddysput konraddysput self-assigned this Nov 5, 2024
@BartoszLitwiniuk
Copy link
Collaborator

BartoszLitwiniuk commented Nov 5, 2024

to be honest I really don't like introducing tuples because of

  • lack of Readability and self-Documentation
  • weak type safety
  • java's type system is designed for strongly-typed, structured objects rather than lightweight, anonymous data structures like tuples
  • if we wanted to add another field/attribute you will introduce Triplet? so it is much more difficult to develop and modify later

It's easier just to wrap two fields with small object and pass it together if they are logically combined, if not then maybe code is bad designed.

Copy link
Collaborator

@BartoszLitwiniuk BartoszLitwiniuk left a comment

Choose a reason for hiding this comment

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

lgtm

@konraddysput konraddysput merged commit bafe650 into master Nov 13, 2024
3 checks passed
@konraddysput konraddysput deleted the improvement/metrics-speedup branch November 13, 2024 13:43
@konraddysput konraddysput mentioned this pull request Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants