-
Notifications
You must be signed in to change notification settings - Fork 50
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
Homework 7 #45
base: master
Are you sure you want to change the base?
Homework 7 #45
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Отличная работа, респект!
```bash | ||
Finished in 6 minutes 36 seconds (files took 7.37 seconds to load) | ||
7673 examples, 0 failures | ||
Line Coverage: 94.95% (12600 / 13270) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
это 13к строк? выглядит маловато, точно coverage корректнг работает?
*** | ||
### Оптимизация - 2 | ||
Решил `ударить по площадям` дабы еще меньше сократить время на feedback loop и | ||
написал скрипт который заменяет все вхождения `create` на `build_stubbed`, если тест проходит, то оставляет изменение. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
да, хороший подход!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
сейчас же ещё AI развился. можно что-то в этом духе сделать с промптом вида попробуй оптимизировать тесты не меняя сути, исходя из вот таких подсказок (create -> build_stubbed, что-то ещё...)
Top 5 slowest suites (by `let` time): | ||
|
||
Boardgames::RollDice::MegaRoll (.../mega_roll_spec.rb:6) – 00:20.066 of 00:26.192 (401) | ||
↳ player – 2666 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😬 😬 😬
|
||
Промежуточный итог: | ||
- в последовательном режиме ускорение с `5 minutes 35 seconds` до `4 minutes 20.5 seconds` | ||
- в параллельном режиме улучшения не произошло: `3 minutes 8.3 seconds` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
зависит от компьютера, но если комп хороший, то можно и 6+ процессов параллельно
``` | ||
|
||
Оптимизировал каждый из этих тестов следующим образом: | ||
- Строил `flamegraph` отчет по тесту, где видна проблемная фабрика |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
## TODO: | ||
Запланировал на следующую неделю продолжить оптимизацию и использовать `stackprof`. | ||
|
||
План построить json отчет с сэмплированием и найти точки роста с использованием `speedscope`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.