{"id":13631706,"url":"https://github.com/igorkasyanchuk/log_analyzer","last_synced_at":"2025-04-06T04:11:08.221Z","repository":{"id":66300854,"uuid":"122241296","full_name":"igorkasyanchuk/log_analyzer","owner":"igorkasyanchuk","description":"Rails logs analyzer (see how fast your views are rendering)","archived":false,"fork":false,"pushed_at":"2023-07-13T09:09:23.000Z","size":5216,"stargazers_count":357,"open_issues_count":2,"forks_count":18,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-30T00:21:43.823Z","etag":null,"topics":["log-analyzer","logger","rails"],"latest_commit_sha":null,"homepage":"https://www.railsjazz.com/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/igorkasyanchuk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"patreon":"igorkasyanchuk"}},"created_at":"2018-02-20T18:55:57.000Z","updated_at":"2025-02-08T12:40:10.000Z","dependencies_parsed_at":"2024-04-12T12:28:25.593Z","dependency_job_id":"af2318e6-cf80-4cc2-9839-71ad3b612d0e","html_url":"https://github.com/igorkasyanchuk/log_analyzer","commit_stats":{"total_commits":70,"total_committers":8,"mean_commits":8.75,"dds":0.3142857142857143,"last_synced_commit":"1c97906516f26b18878dc7c6fada625ce31b96b2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorkasyanchuk%2Flog_analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorkasyanchuk%2Flog_analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorkasyanchuk%2Flog_analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorkasyanchuk%2Flog_analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igorkasyanchuk","download_url":"https://codeload.github.com/igorkasyanchuk/log_analyzer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246953561,"owners_count":20860043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["log-analyzer","logger","rails"],"created_at":"2024-08-01T22:02:35.167Z","updated_at":"2025-04-06T04:11:08.203Z","avatar_url":"https://github.com/igorkasyanchuk.png","language":"Ruby","funding_links":["https://patreon.com/igorkasyanchuk","https://www.patreon.com/igorkasyanchuk"],"categories":["Ruby"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/igorkasyanchuk/log_analyzer.svg?branch=master)](https://travis-ci.org/igorkasyanchuk/log_analyzer)\n[![RailsJazz](https://github.com/igorkasyanchuk/rails_time_travel/blob/main/docs/my_other.svg?raw=true)](https://www.railsjazz.com)\n[![https://www.patreon.com/igorkasyanchuk](https://github.com/igorkasyanchuk/rails_time_travel/blob/main/docs/patron.svg?raw=true)](https://www.patreon.com/igorkasyanchuk)\n[![Listed on OpenSource-Heroes.com](https://opensource-heroes.com/badge-v1.svg)](https://opensource-heroes.com/r/igorkasyanchuk/log_analyzer)\n\n\n# LogAnalyzer\n\nSee how fast is rendering in your Ruby on Rails app. Based on information from logs. Provides you a picture of how often renders and how fast renders your views.\n\n## Sample\n\n[![Sample](https://raw.githubusercontent.com/igorkasyanchuk/log_analyzer/master/docs/screenshot.png)](https://raw.githubusercontent.com/igorkasyanchuk/log_analyzer/master/docs/screenshot.png)\n\n[![Reports](https://raw.githubusercontent.com/igorkasyanchuk/log_analyzer/master/docs/reports.png)](https://raw.githubusercontent.com/igorkasyanchuk/log_analyzer/master/docs/reports.png)\n\nYou can see columns:\n\n* Type - type of file (partial or view = P or V)\n* View - name of view\n* Count - number of renders\n* Avg - average time of rendering (in milliseconds)\n* Max - maximum time of rendering\n* Min - minimum time of rendering\n\n## Installation\n\nCould be installed as standalone (without adding to Gemfile).\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'log_analyzer'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install log_analyzer\n\n## Usage\n\nAfter installation run in console command `log_analyzer -f log/development.log`. You can change the file or sorting (time, count, name).\n\nSamples:\n\n* `log_analyzer log/development.log -s count`\n* `log_analyzer log/production.log`\n* `log_analyzer production.log -csv`\n* `log_analyzer production.log -pdf`\n* `log_analyzer -f log/production.log -s name`\n* `log_analyzer -f log/production.log -s time -f v`\n* `log_analyzer -f log/production.log -s rtime -f v`\n* `log_analyzer -file log/production.log -sort count`\n* `log_analyzer -file log/production.log -sort count -filter view`\n* `log_analyzer -file log/production.log -sort count -filter partial`\n* `log_analyzer -file log/production.log -sort time -filter p`\n* `log_analyzer development.log -csv -s time -f p`\n* `log_analyzer development.log -xls -s time -f p`\n* `log_analyzer log/production.log -pdf --short`\n* `log_analyzer -file log/production.log --short`\n* `log_analyzer --help`\n\n**Based on results you can get an idea what to optimize. For example optimizing most often rendering view could give huge benefit. Now with this tool you can find out what are the numbers.**\n\nBased on the observations I suggest to run this tool for files less than 1Gb. If you have enough RAM - download the log file to local machine and then run the tool.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem on your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/igorkasyanchuk/log_analyzer. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## Contributors\n\n[\u003cimg src=\"https://opensource-heroes.com/svg/embed/igorkasyanchuk/log_analyzer\"\n/\u003e](https://opensource-heroes.com/r/igorkasyanchuk/log_analyzer)\n\nBig thank you to all our contributors:\n\n* [@ck3g](https://github.com/ck3g)\n* [@ritaritual](https://github.com/ritaritual)\n* [@y-yagi](https://github.com/y-yagi)\n* [@RafaelHashimoto](https://github.com/RafaelHashimoto)\n* [@Quentinchampenois](https://github.com/Quentinchampenois)\n* [@denys281](https://github.com/denys281)\n\n## TODO\n\n* more analytics\n* more specs\n* export to XLS\n* export to HTML/CSS/JS with datatable.js\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n[\u003cimg src=\"https://github.com/igorkasyanchuk/rails_time_travel/blob/main/docs/more_gems.png?raw=true\"\n/\u003e](https://www.railsjazz.com/?utm_source=github\u0026utm_medium=bottom\u0026utm_campaign=log_analyzer)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorkasyanchuk%2Flog_analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorkasyanchuk%2Flog_analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorkasyanchuk%2Flog_analyzer/lists"}