Skip to content

Commit 1099578

Browse files
authored
Merge pull request #379 from superfly/gorbak/change_default_batch_size
Change the default batch size from 50 to 100
2 parents af1afef + 7c5f51d commit 1099578

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

crates/corro-types/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub const DEFAULT_MAX_SYNC_BACKOFF: u32 = 2;
1313
pub const DEFAULT_MAX_SYNC_BACKOFF: u32 = 15;
1414

1515
const fn default_apply_queue() -> usize {
16-
50
16+
100
1717
}
1818

1919
const fn default_wal_threshold() -> usize {

scripts/generate_benchmark_chart.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
# Batch sizes to display (columns in the chart)
2828
BATCH_SIZES = [1, 2, 5, 10, 25, 50, 100]
29-
29+
DEFAULT_BATCH_SIZE = 100
3030

3131
def parse_criterion_results(target_dir: Path):
3232
"""
@@ -212,15 +212,15 @@ def generate_chart(results: dict, output_file: Path):
212212
alpha=0.9
213213
)
214214

215-
# Add vertical line at x=50 on all subplots
215+
# Add vertical line at the default batch size on all subplots
216216
for ax in [ax1, ax2, ax3, ax4]:
217-
ax.axvline(x=50, color='red', linestyle='--', linewidth=2, alpha=0.7, zorder=1)
217+
ax.axvline(x=DEFAULT_BATCH_SIZE, color='red', linestyle='--', linewidth=2, alpha=0.7, zorder=1)
218218

219219
# Add labels on the top subplots
220-
ax1.text(50, ax1.get_ylim()[1] * 0.95, 'Current batch size',
220+
ax1.text(DEFAULT_BATCH_SIZE, ax1.get_ylim()[1] * 0.95, 'Default batch size',
221221
rotation=90, verticalalignment='top', horizontalalignment='right',
222222
fontsize=9, color='red', fontweight='bold')
223-
ax2.text(50, ax2.get_ylim()[1] * 0.95, 'Current batch size',
223+
ax2.text(DEFAULT_BATCH_SIZE, ax2.get_ylim()[1] * 0.95, 'Default batch size',
224224
rotation=90, verticalalignment='top', horizontalalignment='right',
225225
fontsize=9, color='red', fontweight='bold')
226226

@@ -355,12 +355,12 @@ def generate_partials_chart(results: dict, output_file: Path):
355355
alpha=0.9
356356
)
357357

358-
# Add vertical line at x=50 on both subplots
358+
# Add vertical line at x=DEFAULT_BATCH_SIZE on both subplots
359359
for ax in [ax1, ax2]:
360-
ax.axvline(x=50, color='red', linestyle='--', linewidth=2, alpha=0.7, zorder=1)
360+
ax.axvline(x=DEFAULT_BATCH_SIZE, color='red', linestyle='--', linewidth=2, alpha=0.7, zorder=1)
361361

362362
# Add label on the left subplot
363-
ax1.text(50, ax1.get_ylim()[1] * 0.95, 'Current batch size',
363+
ax1.text(DEFAULT_BATCH_SIZE, ax1.get_ylim()[1] * 0.95, 'Default batch size',
364364
rotation=90, verticalalignment='top', horizontalalignment='right',
365365
fontsize=9, color='red', fontweight='bold')
366366

0 commit comments

Comments
 (0)