Menggunakan mysqlslap number-of-query

From OnnoWiki
Revision as of 15:41, 22 November 2021 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Untuk mengetes 100 concurrent user dan 10.000 query kita dapat menggunakan perintah berikut,

mysqlslap -h localhost -u root -p123456 --auto-generate-sql --concurrency=100
--number-of-queries=10000

Output mysqlslap kira-kira sebagai berikut,

Benchmark
	Average number of seconds to run all queries: 9.331 seconds
	Minimum number of seconds to run all queries: 9.331 seconds
	Maximum number of seconds to run all queries: 9.331 seconds
	Number of clients running queries: 100
	Average number of queries per client: 100

Perhatikan bahwa waktu yang dibutuhkan biasanya akan naik di bandingkan dengan tanpa query.