modulepackage
0.0.0-20250115013701-9ca4bca7ca2b
Repository: https://github.com/ethanvc/fw.git
Documentation: pkg.go.dev
# README
FastWriter implements buffered I/O, which is fast than bufio package and have better P99 performance. Run benchmarks:
go test -bench . -benchmem -benchtime 3s
If you need file rotation function, use lumberjack as the underline writer. Similar library:
Benchmark result:
$ go test -bench . -benchmem
goos: darwin
goarch: arm64
pkg: github.com/ethanvc/fw
Benchmark_Lumberjack-12 300721 4065 ns/op 0 B/op 0 allocs/op
Benchmark_FileWriter-12 418149 2816 ns/op 0 B/op 0 allocs/op
Benchmark_MemoryMapWriter-12 1271971 949.8 ns/op 0 B/op 0 allocs/op
Benchmark_BatchWriter-12 1272800 943.2 ns/op 0 B/op 0 allocs/op
Benchmark_MultiBufferWriter-12 781482 1769 ns/op 24 B/op 0 allocs/op
Benchmark_FastWriter-12 1385382 864.9 ns/op 1 B/op 0 allocs/op
Benchmark_NopWriter-12 1295154 927.8 ns/op 0 B/op 0 allocs/op
Benchmark_BufioWriter-12 1246978 967.4 ns/op 0 B/op 0 allocs/op
PASS
ok github.com/ethanvc/fw 14.944s
# Functions
No description provided by the author
# Structs
No description provided by the author
No description provided by the author