From 21baf23818140fed2ca1fe3e86e039928949bf2b Mon Sep 17 00:00:00 2001 From: Keith Valin Date: Mon, 19 Jan 2026 15:29:06 -0500 Subject: [PATCH 1/2] fix: Skip parsing WARNING lines at end of output --- pyperf/pyperf_run | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pyperf/pyperf_run b/pyperf/pyperf_run index df33a40..e7c4d94 100755 --- a/pyperf/pyperf_run +++ b/pyperf/pyperf_run @@ -166,14 +166,18 @@ generate_csv_file() let "res_count=${res_count}+1" value_sum=`echo "${value}+${value_sum}" | bc -l` done < "${1}.results" - results=`echo "${value_sum}/${res_count}" | bc -l` - printf "%s:%.2f:%s\n" $test_name $results $unit >> ${1}.csv - if [[ $to_use_pcp -eq 1 ]]; then - metric_name="pyperf_${test_name}" - ns_results=$($TOOLS_BIN/convert_val --from_unit $unit --to_unit ns --time_val --value $results | sed -e 's/ns//g') - # Cannot use convert_val directly since it does not support floating point output - sec_results=$(echo "$ns_results/1000000000" | bc -l) - result2pcp "$metric_name" "${sec_results}" + + if [[ $test_name != *"WARNING:"* ]]; then + results=`echo "${value_sum}/${res_count}" | bc -l` + printf "%s:%.2f:%s\n" $test_name $results $unit >> ${1}.csv + + if [[ $to_use_pcp -eq 1 ]]; then + metric_name="pyperf_${test_name}" + ns_results=$($TOOLS_BIN/convert_val --from_unit $unit --to_unit ns --time_val --value $results | sed -e 's/ns//g') + # Cannot use convert_val directly since it does not support floating point output + sec_results=$(echo "$ns_results/1000000000" | bc -l) + result2pcp "$metric_name" "${sec_results}" + fi fi } From 9936ff6d7464169a2cb8311d3b9e5823816b6b32 Mon Sep 17 00:00:00 2001 From: Keith Valin Date: Mon, 19 Jan 2026 15:31:01 -0500 Subject: [PATCH 2/2] fix(pcp): Add PCP reset file This adds openmetrics_pyperf_reset file, which silences warnings about missing metrics. This should fix a bug where metrics are not being reported as well. --- pyperf/openmetrics_pyperf_reset.txt | 96 +++++++++++++++++++++++++++++ pyperf/pyperf_run | 1 + 2 files changed, 97 insertions(+) create mode 100644 pyperf/openmetrics_pyperf_reset.txt diff --git a/pyperf/openmetrics_pyperf_reset.txt b/pyperf/openmetrics_pyperf_reset.txt new file mode 100644 index 0000000..6a0d701 --- /dev/null +++ b/pyperf/openmetrics_pyperf_reset.txt @@ -0,0 +1,96 @@ +iteration 0 +running 0 +numthreads NaN +runtime NaN +throughput NaN +latency NaN +pyperf_2to3 NaN +pyperf_async_generators NaN +pyperf_async_tree_none NaN +pyperf_async_tree_cpu_io_mixed NaN +pyperf_async_tree_io NaN +pyperf_async_tree_memoization NaN +pyperf_asyncio_tcp NaN +pyperf_asyncio_tcp_ssl NaN +pyperf_asyncio_websockets NaN +pyperf_chameleon NaN +pyperf_chaos NaN +pyperf_comprehensions NaN +pyperf_bench_mp_pool NaN +pyperf_bench_thread_pool NaN +pyperf_coroutines NaN +pyperf_coverage NaN +pyperf_crypto_pyaes NaN +pyperf_dask NaN +pyperf_deepcopy NaN +pyperf_deepcopy_reduce NaN +pyperf_deepcopy_memo NaN +pyperf_deltablue NaN +pyperf_docutils NaN +pyperf_dulwich_log NaN +pyperf_fannkuch NaN +pyperf_float NaN +pyperf_create_gc_cycles NaN +pyperf_gc_traversal NaN +pyperf_generators NaN +pyperf_genshi_text NaN +pyperf_genshi_xml NaN +pyperf_go NaN +pyperf_hexiom NaN +pyperf_html5lib NaN +pyperf_json_dumps NaN +pyperf_json_loads NaN +pyperf_logging_format NaN +pyperf_logging_silent NaN +pyperf_logging_simple NaN +pyperf_mako NaN +pyperf_mdp NaN +pyperf_meteor_contest NaN +pyperf_nbody NaN +pyperf_nqueens NaN +pyperf_pathlib NaN +pyperf_pickle NaN +pyperf_pickle_dict NaN +pyperf_pickle_list NaN +pyperf_pickle_pure_python NaN +pyperf_pidigits NaN +pyperf_pprint_pformat NaN +pyperf_pyflate NaN +pyperf_python_startup NaN +pyperf_python_startup_no_site NaN +pyperf_raytrace NaN +pyperf_regex_compile NaN +pyperf_regex_dna NaN +pyperf_regex_effbot NaN +pyperf_regex_v8 NaN +pyperf_richards NaN +pyperf_richards_super NaN +pyperf_scimark_fft NaN +pyperf_scimark_lu NaN +pyperf_scimark_monte_carlo NaN +pyperf_scimark_sor NaN +pyperf_scimark_sparse_mat_mult NaN +pyperf_spectral_norm NaN +pyperf_sqlalchemy_declarative NaN +pyperf_sqlalchemy_imperative NaN +pyperf_sqlglot_normalize NaN +pyperf_sqlglot_optimize NaN +pyperf_sqlglot_parse NaN +pyperf_sqlglot_transpile NaN +pyperf_sqlite_synth NaN +pyperf_sympy_expand NaN +pyperf_sympy_integrate NaN +pyperf_sympy_sum NaN +pyperf_sympy_str NaN +pyperf_telco NaN +pyperf_tomli_loads NaN +pyperf_tornado_http NaN +pyperf_typing_runtime_protocols NaN +pyperf_unpack_sequence NaN +pyperf_unpickle NaN +pyperf_unpickle_list NaN +pyperf_unpickle_pure_python NaN +pyperf_xml_etree_parse NaN +pyperf_xml_etree_iterparse NaN +pyperf_xml_etree_generate NaN +pyperf_xml_etree_process NaN diff --git a/pyperf/pyperf_run b/pyperf/pyperf_run index e7c4d94..18b7406 100755 --- a/pyperf/pyperf_run +++ b/pyperf/pyperf_run @@ -24,6 +24,7 @@ PYTHON_VERSION="" PYPERF_VERSION="1.11.0" copy_dirs="" benchmarks="all" +test_name="pyperf" base_dir=$(dirname $(realpath $0)) #