`

request-log-analyzer log分析工具

阅读更多
参考网址:
http://github.com/wvanbergen/request-log-analyzer
http://www.letrails.cn/archives/rails-performance-optimization-guide/
http://wiki.github.com/wvanbergen/request-log-analyzer/basic-usage


Getting started

Use RubyGems to install request-log-analyzer on your computer:

$ gem install request-log-analyzer


Now you can run request-log-analyzer to analyze a log file:
$ request-log-analyzer log/production.log


Basic usage

If you want to analyze a Rails production log file, use the following syntax:

$ request-log-analyzer production.log


This will generate a report, similar to our Sample output. If you want analyze multiple files (because of logrotate or multiple mongrel log files), you can provide multiple filenames or use wildcards. The files will be process in the order that they are given on the command line.

$ request-log-analyzer mongrel.2008-11.log mongrel.2008-12.log mongrel.2009-01.log 

$ request-log-analyzer production.*.log


Parsing from the standard input

Request-log-analyzer can also parse the standard input by using - or STDIN as filename. This is great in combination with the UNIX tail -f command to parse information live, as it is written to the log file.

$ tail -f production.log | request-log-analyzer -


Request-log-analyzer will then parse any information that is written to the log file until it is stopped by pressing CTRL+C, after which it will present the performance report for all data that has been collected up to that point.


Examples
Write an HTML report to report.html:
$ request-log-analyzer log/production.log --file report.html --output HTML

Only use uncolored ASCII characters in the report:
$ request-log-analyzer log/production.log --boring

Create a database named requests.db with all parsed request information
$ request-log-analyzer log/production.log --database requests.db
分享到:
评论

相关推荐

    request-log-analyzer:基于您的日志文件创建报告。 支持Rails,Apache,MySQL,Delayed :: Job和其他格式

    请求日志分析器 这是一个简单的命令行工具,可以分析各种格式的请求日志文件以生成性能报告。...安装和基本用法 将request-log-analyzer作为Ruby gem安装(您可能需要先在sudo以root身份运行此命令

    Nginx-Log-Analyzer

    Nginx日志分析器一个简易的nginx log分析器,你值得拥有!本项目采用,瑞民族之光幸(Java)开发硬性条件请【最高,最低,最低限度】将nginx日志格式设置为如下格式log_format main '$remote_addr #$...

    薄荷网RubyonRails开发运营实践.pptx

    通过request-log-analyzer,薄荷网能够深入分析应用性能,找出请求量最大、平均耗时最长以及渲染和数据库操作最耗时的请求,从而针对性地进行优化。他们还采取了异步处理策略,如使用Rake任务和消息队列(如Starling...

    Python网络爬虫视频教程.docx

    - **分析工具**:如HTTPAnalyzer等。 ##### 6-2 了解HTTPAnalyzer工具 - **HTTPAnalyzer功能**:捕获网络请求、解析请求响应数据。 - **使用方法**:安装软件、配置代理等。 ##### 6-3 爬取千千音乐PC客户端数据 -...

    Oracle运维最佳实践-下.pdf 带书签

    - **2.1.28 How to Log a Good Performance Service Request** - 当需要向Oracle技术支持提交性能问题时,如何有效地记录问题是关键。 - 本书提供了详细的指南来帮助用户编写有效的服务请求。 - 实例: - 记录...

    Nginx记录分析响应慢的请求及替换网站响应内容的配置

    作者提供了一个名为 `request_speed_log_analyzer` 的分析脚本来帮助解析日志,根据请求、主机或上游服务器进行分组,以便更好地定位问题。 接下来,我们转向 ngx_http_sub_module 模块。这个模块允许你在Nginx内部...

    kataribe:基于响应时间的访问日志分析器

    基于响应时间的访问日志分析器 先决条件 阿帕奇 将%D添加到 。 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D" with_time CustomLog logs/access_log with_time nginx 将$request...

    eac3to V3.17

    * added a flush after every log line to help GUIs * "eac3to some.mpls" now also works if the stream files aren't there, anymore * fixed: number of subtitles was not appended to demuxed subtitles' file...

    elasticsearch数据库下载以及 配置、使用案例,项目代码

    log_data = request.json res = es.index(index=index_name, document=log_data) return jsonify({'status': 'success', 'message': f'Document added with ID {res["_id"]}'}) if __name__ == '__main__': app...

    cts-2021:ASE布加勒斯特的软件质量和测试实验室

    7. **内存分析**:MAT(Memory Analyzer Tool)帮助Java开发者检测内存泄漏,优化内存使用。 8. **TDD(测试驱动开发)**:先编写测试用例,再编写实现代码,确保功能满足需求,并且遵循良好的设计原则。 9. **...

    微软内部资料-SQL性能优化3

    [BULK-OP-LOG] – Bulk Operation Lock for Log Table Lock Sub-Resources: Full Table Lock (default) [UPD-STATS] – Update statistics Lock [COMPILE] – Compile Lock Index Lock sub-Resources: Full Index ...

    linux 命令英文全称

    lex(LEXical analyser)是一个词法分析器(lexical analyzer generator)。 #### lisp=LIStProcessing LISP(LISt Processing)是一种函数式编程语言(functional programming language)。 #### ln=LiNk ln(LiNk)命令...

Global site tag (gtag.js) - Google Analytics