<commit_before>#!/bin/bash -ex
#
# Copyright (C) 2014 Red Hat <<EMAIL>>
#
# Author: <NAME> <<EMAIL>>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library Public License for more details.
#
: ${ACTION:=--check}
: ${STRIPE_WIDTHS:=4096 4651 8192 10000 65000 65536}
: ${VERBOSE:=} # VERBOSE=--debug-osd=20
: ${JERASURE_VARIANTS:=generic sse3 sse4}
: ${MYDIR:=--base $(dirname $0)}

while read k m l ; do
    for stripe_width in $STRIPE_WIDTHS ; do
        ceph_erasure_code_non_regression --stripe-width $stripe_width --plugin lrc --parameter k=$k --parameter m=$m --parameter l=$l $ACTION $VERBOSE $MYDIR
    done
done <<EOF
2 2 2
4 2 3
8 4 3
EOF

while read k m ; do
    for technique in reed_sol_van cauchy ; do
        for stripe_width in $STRIPE_WIDTHS ; do
            ceph_erasure_code_non_regression --stripe-width $stripe_width --plugin isa --parameter technique=$technique --parameter k=$k --parameter m=$m $ACTION $VERBOSE $MYDIR
        done
    done
done <<EOF
2 1
3 1
3 2
4 2
4 3
7 3
7 4
7 5
8 3
8 4
9 3
9 4
9 5
9 6
EOF

while read k m ; do
    for stripe_width in $STRIPE_WIDTHS ; do
        for technique in cauchy_good cauchy_orig ; do
            for alignment in '' '--parameter jerasure-per-chunk-alignment=true' ; do
                ceph_erasure_code_non_regression --stripe-width $stripe_width --parameter packetsize=32 --plugin jerasure --parameter technique=$technique --parameter k=$k --parameter m=$m $alignment $ACTION $VERBOSE $MYDIR
            done
        done
    done
done <<EOF
2 1
3 1
3 2
4 2
4 3<commit_msg>only run isa tests if the isa plugin is available<commit_after>#!/bin/bash -ex
#
# Copyright (C) 2014 Red Hat <<EMAIL>>
#
# Author: <NAME> <<EMAIL>>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library Public License for more details.
#
: ${ACTION:=--check}
: ${STRIPE_WIDTHS:=4096 4651 8192 10000 65000 65536}
: ${VERBOSE:=} # VERBOSE=--debug-osd=20
: ${JERASURE_VARIANTS:=generic sse3 sse4}
: ${MYDIR:=--base $(dirname $0)}

while read k m l ; do
    for stripe_width in $STRIPE_WIDTHS ; do
        ceph_erasure_code_non_regression --stripe-width $stripe_width --plugin lrc --parameter k=$k --parameter m=$m --parameter l=$l $ACTION $VERBOSE $MYDIR
    done
done <<EOF
2 2 2
4 2 3
8 4 3
EOF

if ceph_erasure_code --plugin_exists isa ; then
    while read k m ; do
        for technique in reed_sol_van cauchy ; do
            for stripe_width in $STRIPE_WIDTHS ; do
                ceph_erasure_code_non_regression --stripe-width $stripe_width --plugin isa --parameter technique=$technique --parameter k=$k --parameter m=$m $ACTION $VERBOSE $MYDIR
            done
        done
    done <<EOF
2 1
3 1
3 2
4 2
4 3
7 3
7 4
7 5
8 3
8 4
9 3
9 4
9 5
9 6
EOF
fi

while read k m ; do
    for stripe_width in $STRIPE_WIDTHS ; do
        for technique in cauchy_good cauchy_orig ; do
            for alignment in '' '--parameter jerasure-per-chunk-alignment=true' ; do
                ceph_erasure_code_non_regression --stripe-width $stripe_width --parameter packetsize=32 --plugin jerasure --parameter technique=$technique --parameter k=$k --parameter m=$m $alignment $ACTION $VERBOSE $MYDIR
            done
        done
    done
done <<EOF
2 1
3 1
3 2
4 2
4 3
{'fraction_non_alphanumeric': 0.09419743782969103, 'fraction_numerical': 0.043205224817884955, 'mean_word_length': 3.109391124871001, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7042185', 'n_tokens_mistral': 1436, 'n_tokens_neox': 1288, 'n_words': 528}