9e1dd73e55
$ ./gocryptfs -speed gocryptfs v2.1-56-gdb1466f-dirty.stupidchacha; go-fuse v2.1.1-0.20210825171523-3ab5d95a30ae; 2021-09-02 go1.17 linux/amd64 AES-GCM-256-OpenSSL 529.53 MB/s AES-GCM-256-Go 833.85 MB/s (selected in auto mode) AES-SIV-512-Go 155.27 MB/s XChaCha20-Poly1305-Go 715.33 MB/s (use via -xchacha flag) XChaCha20-Poly1305-OpenSSL 468.94 MB/s https://github.com/rfjakob/gocryptfs/issues/452
38 lines
694 B
Go
38 lines
694 B
Go
package speed
|
|
|
|
/*
|
|
Make the "-speed" benchmarks also accessible to the standard test system.
|
|
Example run:
|
|
|
|
$ go test -bench .
|
|
BenchmarkStupidGCM-2 100000 22552 ns/op 181.62 MB/s
|
|
BenchmarkGoGCM-2 20000 81871 ns/op 50.03 MB/s
|
|
BenchmarkAESSIV-2 10000 104623 ns/op 39.15 MB/s
|
|
PASS
|
|
ok github.com/rfjakob/gocryptfs/v2/internal/speed 6.022s
|
|
*/
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func BenchmarkStupidGCM(b *testing.B) {
|
|
bStupidGCM(b)
|
|
}
|
|
|
|
func BenchmarkGoGCM(b *testing.B) {
|
|
bGoGCM(b)
|
|
}
|
|
|
|
func BenchmarkAESSIV(b *testing.B) {
|
|
bAESSIV(b)
|
|
}
|
|
|
|
func BenchmarkXchacha(b *testing.B) {
|
|
bXchacha20poly1305(b)
|
|
}
|
|
|
|
func BenchmarkStupidXchacha(b *testing.B) {
|
|
bStupidXchacha(b)
|
|
}
|