1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-25 17:27:25 +00:00
restic/internal/backend
greatroar 190d8e2f51 Flatten backend.LimitedReadCloser structure
This inlines the io.LimitedReader into the LimitedReadCloser body to
achieve fewer allocations. Results on linux/amd64:

name                                      old time/op    new time/op    delta
Backend/BenchmarkLoadPartialFile-8           412µs ± 4%     413µs ± 4%    ~     (p=0.634 n=17+17)
Backend/BenchmarkLoadPartialFileOffset-8     455µs ±13%     441µs ±10%    ~     (p=0.072 n=20+18)

name                                      old speed      new speed      delta
Backend/BenchmarkLoadPartialFile-8        10.2GB/s ± 3%  10.2GB/s ± 4%    ~     (p=0.817 n=16+17)
Backend/BenchmarkLoadPartialFileOffset-8  9.25GB/s ±12%  9.54GB/s ± 9%    ~     (p=0.072 n=20+18)

name                                      old alloc/op   new alloc/op   delta
Backend/BenchmarkLoadPartialFile-8            888B ± 0%      872B ± 0%  -1.80%  (p=0.000 n=15+15)
Backend/BenchmarkLoadPartialFileOffset-8      888B ± 0%      872B ± 0%  -1.80%  (p=0.000 n=15+15)

name                                      old allocs/op  new allocs/op  delta
Backend/BenchmarkLoadPartialFile-8            18.0 ± 0%      17.0 ± 0%  -5.56%  (p=0.000 n=15+15)
Backend/BenchmarkLoadPartialFileOffset-8      18.0 ± 0%      17.0 ± 0%  -5.56%  (p=0.000 n=15+15)
2020-06-17 13:11:45 +02:00
..
azure simplified prefix removal, removed unnecessary if-else statements 2019-06-30 23:34:47 +03:00
b2 b2: simplify object iteration 2018-10-05 11:39:02 -07:00
gs simplified prefix removal, removed unnecessary if-else statements 2019-06-30 23:34:47 +03:00
local remove unused code 2019-07-01 00:24:45 +03:00
location Add rclone backend 2018-04-01 10:16:31 +02:00
mem backend: Improve Save() 2018-03-03 15:49:44 +01:00
rclone Remove all workarounds for Go < 1.11 2020-02-26 20:35:13 +01:00
rest backend/rest: Ensure base URL ends with slash 2018-04-01 10:18:38 +02:00
s3 Merge pull request #2484 from restic/add-s3-region 2019-11-22 15:51:17 +01:00
sftp Revert "Put host last in SSH command line" 2020-03-08 16:45:33 +01:00
swift remove unused code 2019-07-01 00:24:45 +03:00
test Make backend benchmarks fairer by removing checks 2020-06-17 13:11:45 +02:00
testdata
backend_error.go backend: Improve Save() 2018-03-03 15:49:44 +01:00
backend_retry.go Update vendored library github.com/cenkalti/backoff 2018-03-30 11:45:27 +02:00
backend_retry_test.go backend: Improve Save() 2018-03-03 15:49:44 +01:00
doc.go
foreground_solaris.go Move backend/sftp.StartForeground to backend/ 2018-04-01 10:16:31 +02:00
foreground_unix.go Move backend/sftp.StartForeground to backend/ 2018-04-01 10:16:31 +02:00
foreground_windows.go Add rclone backend 2018-04-01 10:16:31 +02:00
http_transport.go http backend: Parse the correct argument when loading --tls-client-cert 2018-04-30 15:21:09 -07:00
layout.go backend: Only return top-level files for most dirs 2017-12-14 19:14:16 +01:00
layout_default.go backend: Only return top-level files for most dirs 2017-12-14 19:14:16 +01:00
layout_rest.go backend: Only return top-level files for most dirs 2017-12-14 19:14:16 +01:00
layout_s3legacy.go backend: Only return top-level files for most dirs 2017-12-14 19:14:16 +01:00
layout_test.go simplified string sorting by using a more suitable function 2019-06-30 23:20:32 +03:00
paths.go
semaphore.go swift backend: fix premature release of semaphore in Load() & document 2017-11-02 12:38:17 -04:00
shell_split.go Refactor SplitShellStrings 2018-04-01 10:16:31 +02:00
shell_split_test.go Refactor SplitShellStrings 2018-04-01 10:16:31 +02:00
utils.go Flatten backend.LimitedReadCloser structure 2020-06-17 13:11:45 +02:00
utils_test.go Add []byte to repo.LoadAndDecrypt and utils.LoadAll 2019-04-13 13:38:39 +02:00