summaryrefslogtreecommitdiff
path: root/internal/syscallcompat/sys_common_test.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-10-18 00:25:42 +0200
committerJakob Unterwurzacher2020-10-18 00:25:42 +0200
commitc943ed32aaf94a4e60d96c7a513180d29b15a40a (patch)
treee64fc1672ccb57abb71327b38640eca79a3adaf8 /internal/syscallcompat/sys_common_test.go
parent95ea7383f9aeef83e6ce7a06d49d0f24857ef30a (diff)
syscallcompat: add getxattr fastpaths
The allocations from Lgetxattr were #1 in the tar extract allocation profile (caused by security.capability lookups). No more! $ benchstat old.txt new.txt name old time/op new time/op delta Lgetxattr-4 15.2µs ± 0% 1.8µs ± 0% ~ (p=1.000 n=1+1) $ ./benchmark.bash Testing gocryptfs at /tmp/benchmark.bash.H8p: gocryptfs v2.0-beta1-4-g95ea738-dirty; go-fuse v2.0.4-0.20200908172753-0b6cbc515082 => github.com/rfjakob/go-fuse/v2 v2.0.4-0.20201015204057-88b12c99f8af; 2020-10-18 go1.15.3 linux/amd64 /tmp/benchmark.bash.H8p.mnt is a mountpoint WRITE: 262144000 bytes (262 MB, 250 MiB) copied, 0,520109 s, 504 MB/s READ: 262144000 bytes (262 MB, 250 MiB) copied, 0,255672 s, 1,0 GB/s UNTAR: 30,238 MD5: 12,721 LS: 10,038 RM: 16,536
Diffstat (limited to 'internal/syscallcompat/sys_common_test.go')
-rw-r--r--internal/syscallcompat/sys_common_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/syscallcompat/sys_common_test.go b/internal/syscallcompat/sys_common_test.go
index f53b0d2..c5f05a9 100644
--- a/internal/syscallcompat/sys_common_test.go
+++ b/internal/syscallcompat/sys_common_test.go
@@ -318,6 +318,6 @@ func TestFstatat(t *testing.T) {
// queries security.capabilities for every file access.
func BenchmarkLgetxattr(b *testing.B) {
for i := 0; i < b.N; i++ {
- Lgetxattr("/", "this.attr.does.not.exist")
+ Lgetxattr("/", "user.this.attr.does.not.exist")
}
}