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

Issue 24 #28

Merged
merged 8 commits into from
Dec 6, 2021
Merged

Issue 24 #28

merged 8 commits into from
Dec 6, 2021

Conversation

swnsma
Copy link
Contributor

@swnsma swnsma commented Nov 13, 2021

Related ticket:
#24

Metrics added:

  • magento_shipments_count_total (source, store_code)
  • magento_catalog_category_count_total (status, menu_status, store_code)
  • magento_website_count_total

Metrics changed:

  • magento_store_count_total -> magento_store_count_total (status)

Adjusted unit tests coverage.
Updated README.md

Points to discuss:

  1. magento_catalog_category_count_total - currently collects 4 metric for each store:
  • category enabled, added to the menu
  • category enabled, removed to the menu
  • category disabled, added to the menu
  • category disabled, removed to the menu

Possible suggestions:

  • remove menu_status label and collect only category status
  • do not collect menu_status if category is disabled (= leave only 3 metrics, if category disabled - consider that it won't be showed in the menu).
  1. magento_catalog_category_count_total - default store (admin) is not included to the statistic.
    It will require separated SQL query to fetch data for admin store (e.g. all available categories). Should we collect this data too, or only leave data collection per actual store?

- add state fix for console command
- add command option resolving fix
- add shipments aggregator
- add shipments count aggregator unit tests coverage.
- add categories count aggregator based on category status, category menu status and store code
- add unit tests coverage for categories count aggregator.
- adjust 'magento_store_count_total' metric;
- add status label to stores count;
- adjust unit tests coverage;
- Add magento_website_count_total metric.
- add unit tests coverage.
- Update readme.md file.
- Fix code styles.
- Fix code styles.
@swnsma
Copy link
Contributor Author

swnsma commented Nov 13, 2021

I believe it does not make sense to fix alignments, as difference in PHP Storm settings.
If it should be fixed, please share code style schema which will follow the check.

@DavidLambauer DavidLambauer self-requested a review November 14, 2021 18:45
{
private const METRIC_CODE = 'magento_catalog_category_count_total';
private const T_ATT = 'm2_eav_attribute';
private const T_CAT_ENT_INT = 'm2_catalog_category_entity_int';
Copy link
Member

Choose a reason for hiding this comment

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

What are these abbreviations? Test? Table? I'd suggest to be more explicit here.

@DavidLambauer
Copy link
Member

Hi @swnsma, thank you for the PR. I am gonna look at the CI stuff next week. I guess it is time to check out the Github Actions :D.

Besides that, your code looks fine. I don't actually like these crazy big SQL's but I guess we have to use them in order to be as performant as possible. Will try the metrics and give feedback next as well

Fix code review notices.
@DavidLambauer DavidLambauer merged commit 87af62e into run-as-root:master Dec 6, 2021
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