Skip to content

Conversation

@araslanov-e
Copy link

No description provided.

Copy link
Collaborator

@spajic spajic left a comment

Choose a reason for hiding this comment

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

👍 ✅

```

### Feedback-Loop
Для того, чтобы иметь возможность быстро проверять гипотезы я решил использовать часть тестов которые я хорошо знаю и которые с обычным запуском через `rspec` проходят сейчас за 25 секунд.
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 nice move

```
name total top-level total time time per call top-level time

card 769 516 7.4789s 0.0097s 4.8298s
Copy link
Collaborator

Choose a reason for hiding this comment

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

а реально необходимо 516 раз создавать card, или можно как-то зареюзать?

also, можно попробовать посмотреть, нельзя ли что-то ускорить в самом создании одного card, потому что 7 секунд на 700 штук выглядит довольно медленно (можно сравнить с другими фабриками по этому показателю)

Copy link
Author

Choose a reason for hiding this comment

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

Не указал тут, но скидывал в чат, что создание фабрик занимает почти 70% времени тестов(
Да, надо ещё будет поразбираться. Есть места где создаются лишние, но в отдельных тестах они не выглядят как точки роста, а в общей массе не понятно с чего начинать

card_token 769 42 1.9425s 0.0025s 0.1034s
```
Он показал что мы вместе с `card` создаем `card_token`, который хранит в себе некоторую дополнительную информацию, а данную информацию мы никак не используем в текущих тестах.
Так же был построен flamegraph
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

```

### Результаты
Получилось использовать `test-prof` в рабочем проекте, но, CI с правками не показал каких либо изменений (запускается в 20 потоков).
Copy link
Collaborator

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 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