Как отобразить процентиль статистики по URL на консоли - PullRequest
0 голосов
/ 08 октября 2018

Я работаю над написанием некоторых тестов производительности с использованием Taurus & Jmeter.После выполнения набора тестов для некоторых URL-адресов, я вижу статистику на консоли, как показано ниже.

19:03:40 INFO: Percentiles:
+---------------+---------------+
| Percentile, % | Resp. Time, s |
+---------------+---------------+
|          95.0 |         2.731 |
+---------------+---------------+
19:03:40 INFO: Request label stats:
+--------------+--------+---------+--------+-------+
| label        | status |    succ | avg_rt | error |
+--------------+--------+---------+--------+-------+
| /v1/brands   |   OK   | 100.00% |  2.730 |       |
| /v1/catalogs |   OK   | 100.00% |  1.522 |       |
+--------------+--------+---------+--------+-------+

Мне интересно, есть ли способ отобразить другие метки для каждого URL-адреса.напримерпроцентное время отклика на URL.

Ниже приведены все статистические данные, которые можно получить из Тельца.(согласно документации по Тельцу), но я не смог понять, какая конфигурация необходима для отображения их на консоли.Цени любую помощь.

label - is the sample group for which this CSV line presents the stats. Empty label means total of all labels
concurrency - average number of Virtual Users
throughput - total count of all samples
succ - total count of not-failed samples
fail - total count of saved samples
avg_rt - average response time
stdev_rt - standard deviation of response time
avg_ct - average connect time if present
avg_lt - average latency if present
rc_200 - counts for specific response codes
perc_0.0 .. perc_100.0 - percentile levels for response time, 0 is also minimum response time, 100 is maximum
bytes - total download size

1 Ответ

0 голосов
/ 08 октября 2018

Изучая документацию по Taurus Console Reporter , можно изменить только следующие параметры:

modules:
  console:
    # disable console reporter
    disable: false  # default: auto
 
    # configure screen type
    screen: console
    # valid values are:
    # - console (ncurses-based dashboard, default for *nix systems)
    # - gui (window-based dashboard, default for Windows, requires Tkinter)
    # - dummy (text output into console for non-tty cases)

    dummy-cols: 140  # width for dummy screen
    dummy-rows: 35   # height for dummy screen

Если вы понимаете и пишете код Python, вы можете попробовать изменить reporting.py файл, который отвечает за генерацию статистики и сводной таблицы.Это хороший момент для начала:

def __report_summary_labels(self, cumulative):
    data = [("label", "status", "succ", "avg_rt", "error")]
    justify = {0: "left", 1: "center", 2: "right", 3: "right", 4: "left"}

    sorted_labels = sorted(cumulative.keys())
    for sample_label in sorted_labels:
        if sample_label != "":
            data.append(self.__get_sample_element(cumulative[sample_label], sample_label))
    table = SingleTable(data) if sys.stdout.isatty() else AsciiTable(data)
    table.justify_columns = justify
    self.log.info("Request label stats:\n%s", table.table)

В противном случае вы можете использовать Интерактивные интерактивные отчеты или настроить свой тест JMeter для использования Grafana и InfluxDB в качестве 3-системы хранения и визуализации партийных метрик.

...