MCPcopy Create free account

hub / github.com/binbjz/tpcds_pg / functions

Functions35 in github.com/binbjz/tpcds_pg

↓ 4 callersMethodappend
(self, data: dict)
sys_pg_metrics_collector.py:71
↓ 3 callersFunctionget_env_positive_int
从环境变量读取正整数配置,非法值回退到默认值。
system_resource_stressor.py:7
↓ 2 callersFunctiondo_add
(files: list[Path], text_to_add: str, idempotent_add: bool)
update_query_templates.py:98
↓ 2 callersFunctiondo_remove
(files: list[Path], text_to_remove: str, remove_mode: str)
update_query_templates.py:138
↓ 2 callersMethodflush
(self)
sys_pg_metrics_collector.py:76
↓ 2 callersFunctionget_env_int
获取并校验环境变量中的整数配置;配置非法时回退默认值。
sys_pg_metrics_collector.py:26
↓ 2 callersFunctionparse_non_negative_int
(name: str, value: str)
update_query_templates.py:22
↓ 1 callersFunctionappend_average_to_csv
读取CSV文件,计算每一列的平均值,并将平均值添加到CSV文件的最后一行。 :param filename: CSV文件名
sys_pg_metrics_collector.py:196
↓ 1 callersFunctionbuild_pg_config
构造 PG 连接配置。默认值与原脚本保持一致,并允许通过环境变量覆盖。
sys_pg_metrics_collector.py:46
↓ 1 callersFunctioncalculate_total_time
(log_file: Path, default_unit: str = "ms")
calc_time.py:94
↓ 1 callersFunctioncheck_process_running
检查是否有一个名为 process_name 的进程是否正在运行。
sys_pg_metrics_collector.py:224
↓ 1 callersFunctioncollect_pg_metrics
异步地收集PG内部性能指标。 :param conn: 数据库连接 :return: 返回一个包含各种PG性能指标的字典
sys_pg_metrics_collector.py:114
↓ 1 callersFunctioncollect_system_metrics
在异步环境中运行阻塞性代码,收集系统性能指标。 :return: 返回一个包含各种系统性能指标的字典。实际返回的是一个等待对象
sys_pg_metrics_collector.py:87
↓ 1 callersFunctiondo_check
(files: list[Path])
update_query_templates.py:193
↓ 1 callersFunctioniter_query_files
(directory: Path, start_index: int, end_index: int)
update_query_templates.py:80
↓ 1 callersFunctionmain
()
update_query_templates.py:209
↓ 1 callersFunctionmain
(csv_file: str)
sys_pg_metrics_collector.py:239
↓ 1 callersFunctionmain
()
calc_time.py:141
↓ 1 callersFunctionmain
()
remove_last_pipe.py:140
↓ 1 callersFunctionparse_args
()
update_query_templates.py:28
↓ 1 callersFunctionparse_args
()
calc_time.py:116
↓ 1 callersFunctionparse_args
()
remove_last_pipe.py:117
↓ 1 callersFunctionparse_positive_int
(name: str, value: str)
remove_last_pipe.py:26
↓ 1 callersFunctionparse_time_body_to_ms
解析 'Time:' 后面的时间内容并统一转换为毫秒。 支持: - 12 ms / 12ms - 0.5 s / 2 min - 1m 2s 250ms - 00:01:02.345 - 纯数字(按 default_unit)
calc_time.py:44
↓ 1 callersFunctionplot_metrics_from_csv_chunked_continuous
从给定的 CSV 文件路径分块读取数据,并绘制数值型列的连续图表。 关键特性: 1) x 轴使用全局行号偏移,跨 chunk 连续 2) 最后一行数据仅打印日志,不参与绘图 3) 支持降采样减少绘图点数,提升整体性能
tpcds_metrics_subplotter.py:9
↓ 1 callersFunctionprocess_dat_files
(dat_dir: Path, max_jobs: int, logger: logging.Logger)
remove_last_pipe.py:86
↓ 1 callersFunctionsafe_write_lines
(file_path: Path, lines: list[str])
update_query_templates.py:84
↓ 1 callersFunctionsetup_logger
(log_file: Path)
remove_last_pipe.py:32
↓ 1 callersFunctionstress_memory
打满内存
system_resource_stressor.py:61
↓ 1 callersFunctionstrip_last_pipe
(line: bytes)
remove_last_pipe.py:44
Method__init__
(self, filename: str, buffer_size: int = 1000)
sys_pg_metrics_collector.py:65
Functioncollect_metrics_blocking
收集系统级别指标 :return: 返回一个包含各种系统性能指标的字典
sys_pg_metrics_collector.py:93
Functionprocess_dat_file
(dat_file: Path, logger: logging.Logger)
remove_last_pipe.py:52
Functionstress_cpu
打满所有可用的CPU核心 pkill -f "python.*server_stress.py"
system_resource_stressor.py:40
Functionstress_cpu_core
打满单个CPU核心
system_resource_stressor.py:25