Higher the clone probability to 8% and lower the probability of flatten
to 2%. This should give us longer parent chaines (before this we would
usually have one parent and even then only for a few ops time).
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
}
break;
case OP_CLONE:
- if (!clone_calls || get_random() % 100 > 5 || file_size == 0) {
+ /* clone, 8% chance */
+ if (!clone_calls || file_size == 0 || get_random() % 100 >= 8) {
log4(OP_SKIPPED, OP_CLONE, 0, 0);
goto out;
}
break;
+ case OP_FLATTEN:
+ /* flatten four times as rarely as clone, 2% chance */
+ if (get_random() % 100 >= 2) {
+ log4(OP_SKIPPED, OP_FLATTEN, 0, 0);
+ goto out;
+ }
+ break;
}
switch (op) {