open-vault/builtin/audit
Jeff Mitchell ebc1e64c62
Format requests/responses ahead of time in file audit (#7024)
This was inspired by #7022 but has the advantage of avoiding
double-locking and needing to perform lock upgrades while also
simplifying the logic and being faster.

Original, #7022, this:

goos: linux
goarch: amd64
pkg: github.com/hashicorp/vault/builtin/audit/file
BenchmarkAuditFile_request-4       30000             60734 ns/op
PASS
ok      github.com/hashicorp/vault/builtin/audit/file   2.428s

goos: linux
goarch: amd64
pkg: github.com/hashicorp/vault/builtin/audit/file
BenchmarkAuditFile_request-4       50000             34772 ns/op
PASS
ok      github.com/hashicorp/vault/builtin/audit/file   2.086s

goos: linux
goarch: amd64
pkg: github.com/hashicorp/vault/builtin/audit/file
BenchmarkAuditFile_request-4       50000             25302 ns/op
PASS
ok      github.com/hashicorp/vault/builtin/audit/file   1.542s

Fixes #7014
Closes #7022
2019-07-01 16:07:03 -04:00
..
file Format requests/responses ahead of time in file audit (#7024) 2019-07-01 16:07:03 -04:00
socket Allow plugins to submit audit requests/responses via extended SystemView (#6777) 2019-05-22 18:52:53 -04:00
syslog Allow plugins to submit audit requests/responses via extended SystemView (#6777) 2019-05-22 18:52:53 -04:00