Skip to Content
Java持续交付
book

Java持续交付

by Daniel Bryant, Abraham Marín-Pérez
November 2019
Beginner to intermediate
406 pages
9h 21m
Chinese
Publishing House of Electronics Industry
Content preview from Java持续交付
298
12
系统质量属性测试:验证非功能性需求
使用
Apache Benchmark
进行基本的性能测试
Apache Bench ab
工具是一个非常易于使用的性能基准测试工具。它是一个命令行(
CLI
工具,通过向指定
URL
生成大量的请求,然后将相关的性能指标返回给终端。虽然它
不是很灵活,但是当你需要快速进行性能测试时,它是一个非常不错的工具。你可以
通过包管理器来安装这个工具。如果你使用的是
Windows
,可以通过
Chocolately
安装
SuperBenchmarker
作为替代(
https://github.com/aliostad/SuperBenchmarke
r
)。安装完后,
你只需在终端输入
ab
即可查看可用的参数列表。最常用的
-n
参数用来指定基准测试会
话要执行的请求数,
-c
参数表示可执行的并发请求数,以及目标的
URL
。例如,如果
你要对
Google
进行一次性能测试,一共执行
10
次请求,每次执行
2
个,可以运行示例
12-8
所示的命令。
示例12-8:使用Apache Bench abGoogle进行一次性能基准测试
$ ab -n 10 -c 2 http://www.google.com/
This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Python机器学习案例精解

Python机器学习案例精解

Posts & Telecom Press, Yuxi (Hayden) Liu
Java性能优化实践:JVM调优策略、工具与技巧

Java性能优化实践:JVM调优策略、工具与技巧

Benjamin J. Evans, James Gough, Chris Newland
Python和NLTK实现自然语言处理

Python和NLTK实现自然语言处理

Posts & Telecom Press, Nitin Hardeniya
C++语言导学(原书第2版)

C++语言导学(原书第2版)

本贾尼 斯特劳斯特鲁普

Publisher Resources

ISBN: 9787121374425