From 39032ba9c6a352c081c294bf6c51454b162ca039 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Mon, 23 Nov 2015 20:59:28 +0100 Subject: [PATCH] qa: erasure-code-benchmark technique and plugin selection Update the PLUGINS variable that was no longer used. Add the TECHNIQUES variable to control which techniques are compared. Signed-off-by: Loic Dachary --- qa/workunits/erasure-code/bench.sh | 11 +++-- qa/workunits/erasure-code/plot.js | 74 +++++++++++++++++++----------- 2 files changed, 52 insertions(+), 33 deletions(-) diff --git a/qa/workunits/erasure-code/bench.sh b/qa/workunits/erasure-code/bench.sh index 31fc1f98e38ca..8e8671c49ccf8 100755 --- a/qa/workunits/erasure-code/bench.sh +++ b/qa/workunits/erasure-code/bench.sh @@ -49,7 +49,8 @@ export PATH=/sbin:$PATH : ${VERBOSE:=false} : ${CEPH_ERASURE_CODE_BENCHMARK:=ceph_erasure_code_benchmark} : ${PLUGIN_DIRECTORY:=/usr/lib/ceph/erasure-code} -: ${PLUGINS:=example jerasure isa} +: ${PLUGINS:=isa jerasure_generic jerasure_sse4} +: ${TECHNIQUES:=vandermonde cauchy} : ${TOTAL_SIZE:=$((1024 * 1024))} : ${SIZE:=4096} : ${PARAMETERS:=--parameter jerasure-per-chunk-alignment=true} @@ -116,8 +117,8 @@ function bench_run() { local jerasure_generic2technique_cauchy='cauchy_good' local jerasure_sse42technique_vandermonde='reed_sol_van' local jerasure_sse42technique_cauchy='cauchy_good' - for technique in vandermonde cauchy ; do - for plugin in isa jerasure_generic jerasure_sse4 ; do + for technique in ${TECHNIQUES} ; do + for plugin in ${PLUGINS} ; do eval technique_parameter=\$${plugin}2technique_${technique} echo "serie encode_${technique}_${plugin}" for k in $ks ; do @@ -131,8 +132,8 @@ function bench_run() { done done done - for technique in vandermonde cauchy ; do - for plugin in isa jerasure_generic jerasure_sse4 ; do + for technique in ${TECHNIQUES} ; do + for plugin in ${PLUGINS} ; do eval technique_parameter=\$${plugin}2technique_${technique} echo "serie decode_${technique}_${plugin}" for k in $ks ; do diff --git a/qa/workunits/erasure-code/plot.js b/qa/workunits/erasure-code/plot.js index fa3013117cc1d..793ab1a7b1a78 100644 --- a/qa/workunits/erasure-code/plot.js +++ b/qa/workunits/erasure-code/plot.js @@ -1,80 +1,98 @@ $(function() { - $.plot("#encode", [ - { + encode = []; + if (typeof encode_vandermonde_isa != 'undefined') { + encode.push({ data: encode_vandermonde_isa, label: "ISA, Vandermonde", points: { show: true }, lines: { show: true }, - }, - { + }); + } + if (typeof encode_vandermonde_jerasure_generic != 'undefined') { + encode.push({ data: encode_vandermonde_jerasure_generic, label: "Jerasure Generic, Vandermonde", points: { show: true }, lines: { show: true }, - }, - { + }); + } + if (typeof encode_vandermonde_jerasure_sse4 != 'undefined') { + encode.push({ data: encode_vandermonde_jerasure_sse4, label: "Jerasure SIMD, Vandermonde", points: { show: true }, lines: { show: true }, - }, - { + }); + } + if (typeof encode_cauchy_isa != 'undefined') { + encode.push({ data: encode_cauchy_isa, label: "ISA, Cauchy", points: { show: true }, lines: { show: true }, - }, - { + }); + } + if (typeof encode_cauchy_jerasure_generic != 'undefined') { + encode.push({ data: encode_cauchy_jerasure_generic, label: "Jerasure, Cauchy", points: { show: true }, lines: { show: true }, - }, - ], { + }); + } + $.plot("#encode", encode, { xaxis: { mode: "categories", tickLength: 0 }, - } - ); + }); - $.plot("#decode", [ - { + decode = []; + if (typeof decode_vandermonde_isa != 'undefined') { + decode.push({ data: decode_vandermonde_isa, label: "ISA, Vandermonde", points: { show: true }, lines: { show: true }, - }, - { + }); + } + if (typeof decode_vandermonde_jerasure_generic != 'undefined') { + decode.push({ data: decode_vandermonde_jerasure_generic, label: "Jerasure Generic, Vandermonde", points: { show: true }, lines: { show: true }, - }, - { + }); + } + if (typeof decode_vandermonde_jerasure_sse4 != 'undefined') { + decode.push({ data: decode_vandermonde_jerasure_sse4, label: "Jerasure SIMD, Vandermonde", points: { show: true }, lines: { show: true }, - }, - { + }); + } + if (typeof decode_cauchy_isa != 'undefined') { + decode.push({ data: decode_cauchy_isa, label: "ISA, Cauchy", points: { show: true }, lines: { show: true }, - }, - { + }); + } + if (typeof decode_cauchy_jerasure_generic != 'undefined') { + decode.push({ data: decode_cauchy_jerasure_generic, label: "Jerasure, Cauchy", points: { show: true }, lines: { show: true }, - }, - ], { + }); + } + $.plot("#decode", decode, { xaxis: { mode: "categories", tickLength: 0 }, - } - ); + }); }); -- 2.39.5