Performance Tool(1)Gatling
1. Installation and Preparation
Download the binary file, the version I am using is gatling-charts-highcharts-1.4.4-bundle.tar.gz.
I unzip and put it here /Users/carl/tool/gatling-charts-highcharts-1.4.4
link a short name for the working directory.
>sudo ln -s /Users/carl/tool/gatling-charts-highcharts-1.4.4 ./gatling-1.4.4
>sudo ln -s gatling-1.4.4 gatling
I already have JDK1.6 on my local machine, even gatling recommend JDK 1.7, but I will still use JDK1.6.
2. Running Gatling
There is a command line interface(CLI).
Add gatling to my system
>vi ~/.profile
export GATLING_HOME=/opt/gatling
export PATH=/opt/gatling/bin:$PATH
>. ~/.profile
>gatling.sh
3. First Steps with Gatling
I will learn about simulations, scenarios, feeders, recorder, loops, scala functions, etc.
Create my own simulation directory under simulations.
>mkdir sillycat
>vi SimulationtoTaobao.scala
I just write a very first simple sample to visit one page on taobao website.
package sillycat
import com.excilys.ebi.gatling.core.Predef._
import com.excilys.ebi.gatling.http.Predef._
import com.excilys.ebi.gatling.jdbc.Predef._
import com.excilys.ebi.gatling.http.Headers._
import akka.util.duration._
import bootstrap._
import assertions._
class SimulationtoTaobao extends Simulation {
// your code starts here
val scn = scenario("My First Scenario")
.exec(http("My Page")
.get("http://www.taobao.com/index_global.php"))
setUp(scn.users(10))
// your code ends here
}
Run gatling.sh
>gatling.sh
And choose sillycat.
I can spend some time to study https://github.com/excilys/excilys-bank.git this project.
4. Read the codes in Basic
Steps
1. The user accesses to the application http://excilys-bank-web.cloudfoundry.com/public/login.html
2. The user enters its credentials and logs in
3. The user accesses to the details of one of its accounts
4. The user accesses to the operations of the previous month
5. The user logs out
5. Gatling Recorder
We can recorder our action through gatling recorder.
>recorder.sh
Follow this document to record my actions.
https://github.com/excilys/gatling/wiki/Recorder#wiki-browser-config
6. Gatling Scenario Explained
…snip…
I will wrote more later about how I use it to stress test on my own application. And read the Explained in details.
References:
https://github.com/excilys/gatling/wiki/Getting-Started
https://github.com/excilys/gatling
http://gatling-tool.org/
分享到:
相关推荐
Gatling is a highly capable load testing tool. It is designed for ease of use, maintainability and high performance.
【低空经济】低空人工智能调度中心建设方案
少儿编程scratch项目源代码文件案例素材-诅咒大厦.zip
scratch少儿编程逻辑思维游戏源码-纸片马里奥 激流勇进.zip
scratch少儿编程逻辑思维游戏源码-一路跳跃.zip
内容概要:本文详细介绍了五个用于空气耦合超声仿真的COMSOL模型,涵盖二维和三维场景,适用于铝板和钢板的多种缺陷检测。每个模型都包含了具体的参数设置、边界条件选择以及优化技巧。例如,Lamb波检测模型展示了如何利用A0模态检测铝板内的气泡,而三维模型则强调了内存管理和入射角参数化扫描的重要性。表面波检测模型提供了裂纹识别的相关性分析方法,变厚度模型则展示了如何通过几何参数化来模拟复杂的工件形态。文中还分享了许多实用的操作技巧,如内存优化、信号处理和自动化检测逻辑。 适用人群:从事无损检测研究的技术人员、COMSOL软件使用者、超声检测领域的研究人员。 使用场景及目标:①帮助用户理解和掌握空气耦合超声仿真的具体实现方法;②提供实际工程应用中的缺陷检测解决方案;③指导用户进行高效的仿真建模和结果分析。 其他说明:文中提供的模型不仅涵盖了常见的缺陷检测场景,还包括了一些高级技巧,如参数化扫描、自动化检测逻辑等,能够显著提高工作效率。同时,文中还给出了硬件配置建议和一些常见的注意事项,确保用户可以顺利运行这些模型。
实训商业源码-【脐橙】租赁 2.80.0+租赁商家-毕业设计.zip
scratch少儿编程逻辑思维游戏源码-幽灵冲刺.zip
scratch少儿编程逻辑思维游戏源码-粘粘世界物理.zip
机器人开发教程&案例&相关项目资源,奖励仅
实训商业源码-酒吧微上墙4.1.0-毕业设计.zip
实训商业源码-会员计次卡V1.1.1-毕业设计.zip
实训商业源码-二手跳蚤市场V5.4.10带微信支付+上架通知+广告插件-毕业设计.zip
实训商业源码-健康保健类企业网站源码-毕业设计.zip
Linux环境安装mysql的RPM包以及安装步骤:客户端和服务端的安装
实训商业源码-房产中介小程序8.0.51+前端-毕业设计.zip
scratch少儿编程逻辑思维游戏源码-钟声.zip
实训商业源码-【最新版】Xyplayer X3.96 官方正式版-毕业设计.zip
scratch少儿编程逻辑思维游戏源码-追逐游戏.zip
内容概要:本文详细介绍了基于Android Studio开发的日历备忘录记事本项目,涵盖日历查看、添加备忘录、闹钟提醒和删除备忘录等功能。项目使用SQLite数据库进行数据管理和持久化,利用AlarmManager实现闹钟提醒功能。文章深入讲解了各个功能模块的实现细节,如日历视图的使用、数据库操作类的设计、闹钟设置的逻辑以及界面交互的优化。此外,还探讨了一些常见的开发技巧和注意事项,如时间戳的存储、手势识别的应用等。 适用人群:适用于初学者和有一定经验的Android开发者,尤其是希望深入了解SQLite数据库操作和AlarmManager使用的开发者。 使用场景及目标:① 学习如何使用Android Studio构建完整的应用程序;② 掌握SQLite数据库的基本操作,包括建表、增删查改;③ 理解AlarmManager的工作机制及其在实际项目中的应用;④ 提升用户体验,如优化界面交互和提高代码质量。 其他说明:文中提供的源码和详细的代码注释有助于读者更好地理解和实践。同时,项目中预留了一些扩展任务,鼓励读者进一步探索和提升技能。