简体   繁体   English

Rails App / webserver基准测试

[英]Rails App/webserver benchmarking

Does anyone know the best lightweight Rails benchmarking tool? 有谁知道最好的轻量级Rails基准测试工具?

I need to get performance statistics of the webserver and simulate authentication + page navigation per session. 我需要获取网络服务器的性能统计信息,并模拟每个会话的身份验证+页面导航。 I've been trying to use httperf, but been encountering TamperingWithCookie exception in the application. 我一直在尝试使用httperf,但在应用程序中遇到了TamperingWithCookie异常。

Ideally, I'd like to separate the application and database from the webserver benchmarking, but interested to see the results of the combination of these. 理想情况下,我想将应用程序和数据库与Web服务器基准测试分开,但有兴趣看看这些组合的结果。

You can try Tsung , a distributed load testing tool written in Erlang. 您可以尝试使用Erlang编写的分布式负载测试工具Tsung It's a general tool but can be easily used with Rails applications. 它是一个通用工具,但可以很容易地与Rails应用程序一起使用。 In case you need to simulate different user behavior scenarios as a kind of integration tests, you could also try Webrat . 如果您需要将不同的用户行为场景模拟为一种集成测试,您还可以尝试Webrat

ruby-prof works well either by you manually hitting your app with a browser, or it can benchmark against tests. ruby-prof可以通过您使用浏览器手动点击您的应用程序,或者它可以对测试进行基准测试。

here's a great writeup on how to use it: http://cfis.savagexi.com/2007/07/18/making-rails-go-vroom 这是一篇关于如何使用它的精彩文章: http//cfis.savagexi.com/2007/07/18/making-rails-go-vroom

and here's where you can download it: http://rubyforge.org/projects/ruby-prof/ 在这里你可以下载它: http//rubyforge.org/projects/ruby-prof/

ab is an Apache tool for benchmarking. ab是用于基准测试的Apache工具。 Probably won't take care of authentication for you but is dead-simple to use: 可能不会为您处理身份验证,但使用起来很简单:

ab -n 300 -c 20 http://website.com

这不是最好的方法,但使用像MS WAS这样的网络压力工具过去曾用过简单的基准测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM