Replies: 7 comments
-
Now gem is working with Rails only. But I want to make it Rack-oriented. It leads to the gem can be used with non-Rails applications. |
Beta Was this translation helpful? Give feedback.
-
You can measure an execution time line-by-line and create some perfomance analyzing tool. It can be a very simple alternative to New Relic (and other such services) - a free version of New Relic does not show a full trace (Transaction Breakdown in their terms). |
Beta Was this translation helpful? Give feedback.
-
@evgeniy-r Thank you for the proposal! I like it. |
Beta Was this translation helpful? Give feedback.
-
It is necessary to measure timing for each application code segment, collect this data and show it in the report. Ruby has Benchmark module in the standard library - https://ruby-doc.org/stdlib-2.7.1/libdoc/benchmark/rdoc/Benchmark.html, it can be a starting point. There are also several open source libraries with benchmark functionality and it may be useful to study them (e. g. https://github.com/schneems/derailed_benchmarks - I don't use it, just for example). |
Beta Was this translation helpful? Give feedback.
-
I had a question about how deep down a rabbit hole this would go? I see from the example it highlights LOC that get hit on the controller, but will it also show LOC from imported code? If my project uses #method_missing or some other meta programming tricks, would this show that or are there plans for that? I ask because one of the problems I encounter on ruby projects is thinking I can delete some "dead code" only to find out its being invoked via some unclear code path or required by convention. |
Beta Was this translation helpful? Give feedback.
-
Yep, it could grab all executed code from all gems you have. In that case, there will so many lines and a request is stopped by a timeout error. So one of the next purposes is to define The gem shows only executed code. It depends on parameters are passed. |
Beta Was this translation helpful? Give feedback.
-
Metaprogramming tricks also will be shown if the line is executed |
Beta Was this translation helpful? Give feedback.
-
Hi there!
Please leave your ideas and proposal in the comments below. This discussion will help us to create new features and developing the lecter.
Beta Was this translation helpful? Give feedback.
All reactions