Skip to content

Commit c20c571

Browse files
authored
Merge pull request #59 from redhat-performance/fix/pcp
Fix PCP metric reporting
2 parents 63bfbeb + 9936ff6 commit c20c571

2 files changed

Lines changed: 109 additions & 8 deletions

File tree

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
iteration 0
2+
running 0
3+
numthreads NaN
4+
runtime NaN
5+
throughput NaN
6+
latency NaN
7+
pyperf_2to3 NaN
8+
pyperf_async_generators NaN
9+
pyperf_async_tree_none NaN
10+
pyperf_async_tree_cpu_io_mixed NaN
11+
pyperf_async_tree_io NaN
12+
pyperf_async_tree_memoization NaN
13+
pyperf_asyncio_tcp NaN
14+
pyperf_asyncio_tcp_ssl NaN
15+
pyperf_asyncio_websockets NaN
16+
pyperf_chameleon NaN
17+
pyperf_chaos NaN
18+
pyperf_comprehensions NaN
19+
pyperf_bench_mp_pool NaN
20+
pyperf_bench_thread_pool NaN
21+
pyperf_coroutines NaN
22+
pyperf_coverage NaN
23+
pyperf_crypto_pyaes NaN
24+
pyperf_dask NaN
25+
pyperf_deepcopy NaN
26+
pyperf_deepcopy_reduce NaN
27+
pyperf_deepcopy_memo NaN
28+
pyperf_deltablue NaN
29+
pyperf_docutils NaN
30+
pyperf_dulwich_log NaN
31+
pyperf_fannkuch NaN
32+
pyperf_float NaN
33+
pyperf_create_gc_cycles NaN
34+
pyperf_gc_traversal NaN
35+
pyperf_generators NaN
36+
pyperf_genshi_text NaN
37+
pyperf_genshi_xml NaN
38+
pyperf_go NaN
39+
pyperf_hexiom NaN
40+
pyperf_html5lib NaN
41+
pyperf_json_dumps NaN
42+
pyperf_json_loads NaN
43+
pyperf_logging_format NaN
44+
pyperf_logging_silent NaN
45+
pyperf_logging_simple NaN
46+
pyperf_mako NaN
47+
pyperf_mdp NaN
48+
pyperf_meteor_contest NaN
49+
pyperf_nbody NaN
50+
pyperf_nqueens NaN
51+
pyperf_pathlib NaN
52+
pyperf_pickle NaN
53+
pyperf_pickle_dict NaN
54+
pyperf_pickle_list NaN
55+
pyperf_pickle_pure_python NaN
56+
pyperf_pidigits NaN
57+
pyperf_pprint_pformat NaN
58+
pyperf_pyflate NaN
59+
pyperf_python_startup NaN
60+
pyperf_python_startup_no_site NaN
61+
pyperf_raytrace NaN
62+
pyperf_regex_compile NaN
63+
pyperf_regex_dna NaN
64+
pyperf_regex_effbot NaN
65+
pyperf_regex_v8 NaN
66+
pyperf_richards NaN
67+
pyperf_richards_super NaN
68+
pyperf_scimark_fft NaN
69+
pyperf_scimark_lu NaN
70+
pyperf_scimark_monte_carlo NaN
71+
pyperf_scimark_sor NaN
72+
pyperf_scimark_sparse_mat_mult NaN
73+
pyperf_spectral_norm NaN
74+
pyperf_sqlalchemy_declarative NaN
75+
pyperf_sqlalchemy_imperative NaN
76+
pyperf_sqlglot_normalize NaN
77+
pyperf_sqlglot_optimize NaN
78+
pyperf_sqlglot_parse NaN
79+
pyperf_sqlglot_transpile NaN
80+
pyperf_sqlite_synth NaN
81+
pyperf_sympy_expand NaN
82+
pyperf_sympy_integrate NaN
83+
pyperf_sympy_sum NaN
84+
pyperf_sympy_str NaN
85+
pyperf_telco NaN
86+
pyperf_tomli_loads NaN
87+
pyperf_tornado_http NaN
88+
pyperf_typing_runtime_protocols NaN
89+
pyperf_unpack_sequence NaN
90+
pyperf_unpickle NaN
91+
pyperf_unpickle_list NaN
92+
pyperf_unpickle_pure_python NaN
93+
pyperf_xml_etree_parse NaN
94+
pyperf_xml_etree_iterparse NaN
95+
pyperf_xml_etree_generate NaN
96+
pyperf_xml_etree_process NaN

pyperf/pyperf_run

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ PYTHON_VERSION=""
2424
PYPERF_VERSION="1.11.0"
2525
copy_dirs=""
2626
benchmarks="all"
27+
test_name="pyperf"
2728

2829
base_dir=$(dirname $(realpath $0))
2930
#
@@ -166,14 +167,18 @@ generate_csv_file()
166167
let "res_count=${res_count}+1"
167168
value_sum=`echo "${value}+${value_sum}" | bc -l`
168169
done < "${1}.results"
169-
results=`echo "${value_sum}/${res_count}" | bc -l`
170-
printf "%s:%.2f:%s\n" $test_name $results $unit >> ${1}.csv
171-
if [[ $to_use_pcp -eq 1 ]]; then
172-
metric_name="pyperf_${test_name}"
173-
ns_results=$($TOOLS_BIN/convert_val --from_unit $unit --to_unit ns --time_val --value $results | sed -e 's/ns//g')
174-
# Cannot use convert_val directly since it does not support floating point output
175-
sec_results=$(echo "$ns_results/1000000000" | bc -l)
176-
result2pcp "$metric_name" "${sec_results}"
170+
171+
if [[ $test_name != *"WARNING:"* ]]; then
172+
results=`echo "${value_sum}/${res_count}" | bc -l`
173+
printf "%s:%.2f:%s\n" $test_name $results $unit >> ${1}.csv
174+
175+
if [[ $to_use_pcp -eq 1 ]]; then
176+
metric_name="pyperf_${test_name}"
177+
ns_results=$($TOOLS_BIN/convert_val --from_unit $unit --to_unit ns --time_val --value $results | sed -e 's/ns//g')
178+
# Cannot use convert_val directly since it does not support floating point output
179+
sec_results=$(echo "$ns_results/1000000000" | bc -l)
180+
result2pcp "$metric_name" "${sec_results}"
181+
fi
177182
fi
178183
}
179184

0 commit comments

Comments
 (0)