week 4 optimisation (Shlyapnikov)#143
Open
usernaimandrey wants to merge 3 commits intohardcode-dev:masterfrom
Open
week 4 optimisation (Shlyapnikov)#143usernaimandrey wants to merge 3 commits intohardcode-dev:masterfrom
usernaimandrey wants to merge 3 commits intohardcode-dev:masterfrom
Conversation
spajic
approved these changes
Feb 28, 2025
Collaborator
spajic
left a comment
There was a problem hiding this comment.
Респект, по максимуму всего сделано 👍
| 100% 2054 (longest request) | ||
| ``` | ||
|
|
||
| ## После того как закешировали паршл среднее время ответа уменьшилось в 2,5 раза |
| Document Path: / | ||
| Document Length: 143451 bytes | ||
| Concurrency Level: 5 | ||
| Time taken for tests: 2.669 seconds |
Collaborator
There was a problem hiding this comment.
как-бдуто >10x по сравнлению с 33.310 seconds
| 100% 206 (longest request) | ||
| ``` | ||
|
|
||
| ## на local_production окружении с кешированием и прекомпиляци ассетов срднее время ответа уменьшилось почти в 5 раз |
| require 'prometheus_exporter/middleware' | ||
| require 'prometheus_exporter/client' | ||
|
|
||
| prometheus_client = PrometheusExporter::Client.new(host: 'localhost') |
| @@ -0,0 +1,62 @@ | |||
| RailsPerformance.setup do |config| | |||
Collaborator
There was a problem hiding this comment.
Ого, я не видел этот гем раньше, респект
Author
There was a problem hiding this comment.
Да я вот, чисто случайно нашел)
| @@ -1,3 +1,9 @@ | |||
| require 'prometheus_exporter/instrumentation' | |||
| PrometheusExporter::Instrumentation::ActiveRecord.start( | |||
| - '-config.file=/etc/prometheus/prometheus.yml' | ||
| ports: | ||
| - '9090:9090' | ||
| grafana: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
+Grafanaдля мониторинга локальногоdev.to`NewRelicдля мониторинга локальногоdev.toSkylight[rails_performance](https://github.com/igorkasyanchuk/rails_performance)Который позицианируют как: "This is a simple and free alternative to the New Relic APM, Datadog or other similar services."
abиrack-mini-profiler- подтверждена гипотиза что заметное время занимает рендерингpartial-ов_single_story.html.erbapp/views/articles/tag_index.html.erbкоторый по моему мнению довольно статичен и изменяется редко