Небольшое
введение в тему тестирования
производительности, на примере
тестирования PostgreSQL на скорость выполнения
запросов.
A test plan is a document detailing a
systematic approach to testing the performance of a system. The most
obvious part of the plan defines test cases which can be
expressed as simply as SQL statements.
Another part of the plan defines the
environment requirements which usually consist of the hardware
and software used for testing. However, this should also attempt to
define potential side effects on the server side which might impact
performance, such as processes running periodically or the state of
the buffer cache:
# CREATE TABLE foo (id SERIAL NOT NULL PRIMARY KEY, value INTEGER NOT NULL); # INSERT INTO foo (value) SELECT i FROM generate_series(1, 1000000) i; # \timing # SELECT * FROM foo WHERE value = 1; Time: 124.278 ms # \! sudo sync # \! echo 3 | sudo tee -a /proc/sys/vm/drop_caches # SELECT * FROM foo WHERE value = 1; Time: 265.871 ms
In order to mitigate the impact of the environment on performance,
the test execution part of the plan should make the necessary
provisions for running multiple times. So, in the final result
analysis part, it could then be possible to produce mean or
median values of the performance.
На примерах
показано, как влияют на результаты
тестирования разные побочные эффекты.
Рассказано, что следует предпринять,
чтобы свести их к минимуму.
original post http://vasnake.blogspot.com/2013/12/blog-post_9599.html
Комментариев нет:
Отправить комментарий