Skip to content

moved metrics in core as union module #233

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

intsynko
Copy link
Collaborator

@intsynko intsynko commented Apr 7, 2022

  1. перенесли класс метрики из smart_kit в класс мониторинга в core и поменяли везде импорты метрик на импорт мониторинга
  2. обернули синглтон инстанс в Proxy класс - это что то типо адаптера, он пробрасывает все вызовы методов в прикрепленный инстанс мониторинга и может подменять один инстанс мониторинга другим. Так же может с тем чтобы уже примененные декораторы вызывались с нужным инстансом монитоирнга
  3. подрутили тесты для отображения для чего это было нужно и как с этим теперь надо работать

SyrexMinus
SyrexMinus previously approved these changes Apr 7, 2022
Copy link
Collaborator

@SyrexMinus SyrexMinus left a comment

Choose a reason for hiding this comment

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

Запустил локалтестинг, ничего не упало.

@intsynko intsynko force-pushed the feature/new_metrics branch from 267b68b to 259e6f8 Compare April 8, 2022 14:57
@bart02 bart02 force-pushed the feature/new_metrics branch from c1b3b4d to e75f346 Compare April 11, 2022 09:35
bart02
bart02 previously approved these changes Apr 11, 2022
def got_histogram(self, param):
def decor_(func):
def wrap(*args, **kwargs):
wrapped_func = self.instance.got_histogram(param)(func)
Copy link
Collaborator

Choose a reason for hiding this comment

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

got_histogram 2 параметра же принимает?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ога, пофиксил

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants