Docs for the Rust version; benchmarks; build.sh fixes
README, CLAUDE.md, man pages, the user guide and its screenshot script now describe the Rust build and the intentional behaviour changes, which docs/MIGRATION.md lists. Go and Rust micro-benchmarks for the same operations, and scripts/bench.sh for end-to-end comparison. build.sh exports its tree root to the per-target jobs and keeps logs out of the output directory; riscv64 musl builds use getrandom's raw syscall backend, since zig's musl getrandom never reaches the kernel there. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// Test-only benchmarks for comparing with the Rust port (scripts/bench.sh).
|
||||
|
||||
package stream
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// STREAM seal and open of 64 MiB, one goroutine (the sequential path).
|
||||
func BenchmarkOracleStream64MiB(b *testing.B) {
|
||||
key := make([]byte, 32)
|
||||
pt := make([]byte, 64<<20)
|
||||
var ct bytes.Buffer
|
||||
b.SetBytes(int64(len(pt)))
|
||||
for b.Loop() {
|
||||
ct.Reset()
|
||||
w, _ := NewEncryptWriter(key, &ct)
|
||||
w.Write(pt)
|
||||
w.Close()
|
||||
r, _ := NewDecryptReader(key, bytes.NewReader(ct.Bytes()))
|
||||
io.Copy(io.Discard, r)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user