Skip to content

Re-order functions in stats_impl to group classes together#4004

Merged
mattklein123 merged 14 commits intoenvoyproxy:masterfrom
jmarantz:re-order-functions
Aug 1, 2018
Merged

Re-order functions in stats_impl to group classes together#4004
mattklein123 merged 14 commits intoenvoyproxy:masterfrom
jmarantz:re-order-functions

Conversation

@jmarantz
Copy link
Contributor

@jmarantz jmarantz commented Jul 31, 2018

Description: stats_impl.cc/h is actually about 4 or 5 different classes which are not that tightly coupled. For include minimalism and being able to find what you are looking for easily, this PR breaks them up:

heap_stat_data.h metric_impl.h stats_impl.h tag_producer_impl.h
histogram_impl.h raw_stat_data.h stats_options_impl.h thread_local_store.h
isolated_store_impl.h stat_data_allocator.h tag_extractor_impl.h utility.h

There are now 1 or 2 tightly related classes per file.

Follow-up PRs are needed to break up stats_impl_test.cc and to rename stats_impl.h to stats_store.h, changing the 60+ refs to that.

Follow-up to #3710
Risk Level: Low
Testing: //test/...
Docs Changes: N/A
Release Notes: N/A

jmarantz added 4 commits July 31, 2018 18:27
Signed-off-by: Joshua Marantz <jmarantz@google.com>
This reverts commit 769be4f.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
…ther.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
….cc.

And un-inline much of IsolatedStoreImpl, to avoid having to recompile
its large ctor with every other file in Envoy.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Copy link
Contributor Author

@jmarantz jmarantz left a comment

Choose a reason for hiding this comment

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

note to reviewers: this just moves functions around -- and un-inlines much of IsolatedStatsStore.

There should be no functional changes.

@mattklein123
Copy link
Member

@jmarantz if you are going to do a code move PR would you prefer to split the files? Up to you. I could see it definitely helping with readability.

@jmarantz
Copy link
Contributor Author

sure -- np. Hold off on the review please; I'll split them up. Splitting the include will likely greatly expand the # of files in the CL but I'll keep it non-functional, so hopefully it'll still be easy to review.

jmarantz added 9 commits July 31, 2018 19:53
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
… to its own file.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
@jmarantz
Copy link
Contributor Author

jmarantz commented Aug 1, 2018

That was definitely a lot more work. This change is again entirely non-functional; just moving stuff around. A fast review would be good here as this PR is highly prone to master merge conflicts.

If you want to suggest changes to this org -- and they are not too pervasive -- it would also be better to do those as a follow-up; again due to potential issues with a delayed master merge.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks, this is awesome. Agreed we can do followups in other PRs.

@mattklein123 mattklein123 merged commit e999cfa into envoyproxy:master Aug 1, 2018
@jmarantz jmarantz deleted the re-order-functions branch August 1, 2018 16:25
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.

2 participants