Last active
August 29, 2015 14:17
-
-
Save hunner/3c217df9a6cc26dc823d to your computer and use it in GitHub Desktop.
perf testing concats
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node 'agent' { | |
$file_count = '100' | |
$backend = 'concat' | |
$content = "test1\n" | |
each(range('1',$file_count)) |$file_num| { | |
case $backend { | |
'concat': { | |
concat { "/tmp/frag_${file_num}": | |
ensure => present, | |
} | |
} | |
'file_concat': { | |
file_concat { "/tmp/frag_${file_num}": | |
ensure => present, | |
tag => "frag_${file_num}", | |
} | |
} | |
'concat_native': { | |
concat_build { "test_frag_${file_num}": | |
target => "/tmp/frag_${file_num}", | |
} | |
} | |
} | |
$fragment_count = 1000 / $file_count | |
$fragment_start = $fragment_count * $file_num | |
$fragment_end = $fragment_start + $fragment_count - 1 | |
each(range($fragment_start,$fragment_end)) |$fragment_num| { | |
case $backend { | |
'concat': { | |
concat::fragment { "test_${fragment_num}": | |
target => "/tmp/frag_${file_num}", | |
content => $content, | |
} | |
} | |
'file_concat': { | |
file_fragment { "test_${fragment_num}": | |
tag => "frag_${file_num}", | |
content => $content, | |
} | |
} | |
'concat_native': { | |
concat_fragment { "test_frag_${file_num}+test_${fragment_num}": | |
content => $content, | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment