mirror of
https://github.com/aziascreations/BakaShrot.git
synced 2026-11-23 20:58:46 +01:00
a5a2f65442
- An attachment is received from one peer at a time: the others are refused NotReady and ask again at their next sync; one cut short lets the next one take it over - A 'replicating' row with all its bytes but never checked is asked again from part 0, and a peer asking from the wrong part resets it - Noted the stream limit (1,048,575 topic/node pairs, 2^43-1 message ids each) in the example config and known-issues.md - Removed NoDefaultTopic (code 6, retired), Writer::vacuum, the v8 detection and the old ini key tests - Cleared the PureBasic-era notes from the docs, revamp.md keeping only the old open items still unfixed; noted the GUI explorer (egui) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
48 lines
2.0 KiB
PowerShell
48 lines
2.0 KiB
PowerShell
# Runs the benchmarks, release mode: the tests ignored by default.
|
|
# push pushes through one server, 10 clients (end_to_end.rs, push_rate)
|
|
# replication 4 servers in a Y, pushed to flat out (end_to_end.rs, replication_rate)
|
|
# storage the storage alone, pushes then reads (storage.rs, storage_rate)
|
|
# docs/server.md and docs/storage.md have the numbers measured so far.
|
|
# Usage: powershell -ExecutionPolicy Bypass -File bench.ps1 [-Only push,replication,storage] [-Sync full|normal]
|
|
# -Sync sets SQLite's synchronous for all of them (otherwise each one's
|
|
# default: full for push and replication, normal for storage). The tests'
|
|
# other variables are taken from the environment as they are: PUSHES and
|
|
# CLIENTS (push), NODES, SECONDS and BATCH (replication), PUSHES (storage).
|
|
param(
|
|
[ValidateSet("push", "replication", "storage")]
|
|
[string[]]$Only = @("push", "replication", "storage"),
|
|
[ValidateSet("full", "normal")]
|
|
[string]$Sync
|
|
)
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
# rustup's folder isn't always on the PATH (it isn't in every shell here).
|
|
if (-not (Get-Command cargo -ErrorAction SilentlyContinue)) {
|
|
$env:PATH = (Join-Path $env:USERPROFILE ".cargo\bin") + [IO.Path]::PathSeparator + $env:PATH
|
|
}
|
|
|
|
# What -Only names, in this order: the package, the test file, the test.
|
|
$benches = [ordered]@{
|
|
push = @("bakashrot-server", "end_to_end", "push_rate")
|
|
replication = @("bakashrot-server", "end_to_end", "replication_rate")
|
|
storage = @("bakashrot-storage", "storage", "storage_rate")
|
|
}
|
|
|
|
$oldSync = $env:SYNC
|
|
if ($Sync) { $env:SYNC = $Sync }
|
|
Push-Location $PSScriptRoot
|
|
try {
|
|
foreach ($name in $benches.Keys) {
|
|
if ($Only -notcontains $name) { continue }
|
|
$package, $file, $test = $benches[$name]
|
|
"== $name ($test)"
|
|
cargo test --locked --release -p $package --test $file $test -- --ignored --exact --nocapture
|
|
if ($LASTEXITCODE -ne 0) { "FAILED: $name"; exit 1 }
|
|
}
|
|
} finally {
|
|
Pop-Location
|
|
$env:SYNC = $oldSync
|
|
}
|
|
"Benchmarks done"
|
|
exit 0
|