openGauss WDR Snapshot生成性能报告详细解读
-- 假设我们已经有了一个WDR的性能测试报告,并且需要从中提取关键的性能指标
SELECT
t.snap_id AS 快照ID,
t.start_time AS 开始时间,
t.end_time AS 结束时间,
t.elapsed_time AS 耗时,
t.cpu_count AS CPU数量,
t.cpu_core AS CPU核心数,
t.cpu_clock AS CPU频率,
t.cpu_type AS CPU类型,
t.mem_total_size AS 内存总大小,
t.disk_total_size AS 磁盘总大小,
t.os_type AS 操作系统类型,
t.os_release AS 操作系统版本,
t.kernel_version AS 内核版本,
t.machine_arch AS 机器架构,
t.hostname AS 主机名,
t.process_num AS 进程数,
t.thread_num AS 线程数,
t.max_connections AS 最大连接数,
t.max_prepared_per_transaction AS 每事务最大预处理语句数,
t.max_query_length AS 最大查询长度,
t.max_transactions AS 最大事务数,
t.work_mem AS 工作内存,
t.statement_mem AS 语句内存
FROM
wdr_snapshot.snapshot_summary t
-- 这里可以根据实际需要添加更多的性能指标
这段代码提供了从WDR性能报告中提取关键性能指标的方法。它简洁地列出了测试的环境参数和性能指标,便于开发和测试人员快速理解和使用。
评论已关闭