restic/internal/restic
greatroar 7bda28f31f Chaining hash table for repository.Index
These are faster to construct but slower to access. The allocation rate
is halved, the peak memory usage almost halved compared to standard map.

Benchmark results on linux/amd64, -benchtime=3s -count=20:

name                                            old time/op    new time/op    delta
PackerManager-8                                    178ms ± 0%     178ms ± 0%     ~     (p=0.231 n=20+20)
DecodeIndex-8                                      4.54s ± 0%     4.30s ± 0%   -5.20%  (p=0.000 n=18+17)
DecodeIndexParallel-8                              4.54s ± 0%     4.30s ± 0%   -5.22%  (p=0.000 n=19+18)
IndexHasUnknown-8                                 44.4ns ± 5%    50.5ns ±11%  +13.82%  (p=0.000 n=19+17)
IndexHasKnown-8                                   48.3ns ± 0%    51.5ns ±12%   +6.68%  (p=0.001 n=16+20)
IndexAlloc-8                                       758ms ± 1%     616ms ± 1%  -18.69%  (p=0.000 n=19+19)
IndexAllocParallel-8                               234ms ± 3%     204ms ± 2%  -12.60%  (p=0.000 n=20+18)
MasterIndexLookupSingleIndex-8                     122ns ± 0%     145ns ± 9%  +18.44%  (p=0.000 n=14+20)
MasterIndexLookupMultipleIndex-8                   369ns ± 2%     429ns ± 8%  +16.27%  (p=0.000 n=20+20)
MasterIndexLookupSingleIndexUnknown-8             68.4ns ± 5%    74.9ns ±13%   +9.47%  (p=0.000 n=20+20)
MasterIndexLookupMultipleIndexUnknown-8            315ns ± 3%     369ns ±11%  +17.14%  (p=0.000 n=20+20)
MasterIndexLookupParallel/known,indices=5-8        743ns ± 1%     816ns ± 2%   +9.87%  (p=0.000 n=17+17)
MasterIndexLookupParallel/unknown,indices=5-8      238ns ± 1%     260ns ± 2%   +9.14%  (p=0.000 n=19+20)
MasterIndexLookupParallel/known,indices=10-8      1.01µs ± 3%    1.11µs ± 2%   +9.79%  (p=0.000 n=19+20)
MasterIndexLookupParallel/unknown,indices=10-8     222ns ± 0%     269ns ± 2%  +20.83%  (p=0.000 n=16+20)
MasterIndexLookupParallel/known,indices=20-8      1.06µs ± 2%    1.19µs ± 2%  +12.95%  (p=0.000 n=19+18)
MasterIndexLookupParallel/unknown,indices=20-8     413ns ± 1%     530ns ± 1%  +28.19%  (p=0.000 n=18+20)
SaveAndEncrypt-8                                  30.2ms ± 1%    30.4ms ± 0%   +0.71%  (p=0.000 n=19+19)
LoadTree-8                                         540µs ± 1%     576µs ± 1%   +6.73%  (p=0.000 n=20+20)
LoadBlob-8                                        5.64ms ± 0%    5.64ms ± 0%     ~     (p=0.883 n=18+17)
LoadAndDecrypt-8                                  5.93ms ± 0%    5.95ms ± 1%     ~     (p=0.247 n=20+19)
LoadIndex-8                                       25.1ms ± 0%    24.5ms ± 1%   -2.54%  (p=0.000 n=18+17)

name                                            old speed      new speed      delta
PackerManager-8                                  296MB/s ± 0%   296MB/s ± 0%     ~     (p=0.229 n=20+20)
SaveAndEncrypt-8                                 139MB/s ± 1%   138MB/s ± 0%   -0.71%  (p=0.000 n=19+19)
LoadBlob-8                                       177MB/s ± 0%   177MB/s ± 0%     ~     (p=0.890 n=18+17)
LoadAndDecrypt-8                                 169MB/s ± 0%   168MB/s ± 1%     ~     (p=0.227 n=20+19)

name                                            old alloc/op   new alloc/op   delta
PackerManager-8                                   91.8kB ± 0%    91.8kB ± 0%     ~     (p=0.772 n=12+19)
IndexAlloc-8                                       786MB ± 0%     400MB ± 0%  -49.04%  (p=0.000 n=20+18)
IndexAllocParallel-8                               786MB ± 0%     401MB ± 0%  -49.04%  (p=0.000 n=19+15)
SaveAndEncrypt-8                                  21.0MB ± 0%    21.0MB ± 0%   +0.00%  (p=0.000 n=19+19)

name                                            old allocs/op  new allocs/op  delta
PackerManager-8                                    1.41k ± 0%     1.41k ± 0%     ~     (all equal)
IndexAlloc-8                                        977k ± 0%      907k ± 0%   -7.18%  (p=0.000 n=20+20)
IndexAllocParallel-8                                977k ± 0%      907k ± 0%   -7.17%  (p=0.000 n=19+15)
SaveAndEncrypt-8                                    73.0 ± 0%      73.0 ± 0%     ~     (all equal)
2020-07-19 13:58:22 +02:00
..
testdata Support time ranges expressed in hours in snapshot retention policies 2018-11-26 14:27:42 +01:00
backend.go backend: Improve Save() 2018-03-03 15:49:44 +01:00
backend_find.go Prevent "slice bounds out of range" error if prefix is longer than snapshot IDs. 2019-04-16 20:26:20 -07:00
backend_find_test.go Prevent "slice bounds out of range" error if prefix is longer than snapshot IDs. 2019-04-16 20:26:20 -07:00
blob.go Chaining hash table for repository.Index 2020-07-19 13:58:22 +02:00
blob_set.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
blob_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
buffer.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
cache.go Automatically exclude current restic cache 2017-09-24 21:54:53 +02:00
config.go Disable polynomial check for chunker for tests 2018-03-11 20:59:40 +01:00
config_test.go internal/restic: fix dropped test error 2020-02-12 13:32:45 -08:00
doc.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
duration.go Extend custom Duration granularity to hours and add tests 2018-11-14 17:27:02 +01:00
duration_test.go Extend custom Duration granularity to hours and add tests 2018-11-14 17:27:02 +01:00
file.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
file_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
find.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
find_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
hardlinks_index.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
hardlinks_index_test.go Remove all dot-imports 2017-10-02 15:06:39 +02:00
id.go Use Minio's optimized SHA-256 2020-04-28 07:57:18 +02:00
id_int_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
id_test.go restic: Make JSON unmarshal for ID more efficient 2019-04-13 13:38:39 +02:00
ids.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
ids_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
idset.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
idset_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
lock.go Make all signal.Notify channels buffered 2020-03-12 20:59:39 +01:00
lock_test.go Update Lock.Time in lock.Refresh() 2019-09-04 11:38:35 -07:00
lock_unix.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
lock_windows.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node.go Centralize buffer allocation and size checking in Repository.LoadBlob 2020-04-23 10:04:20 +02:00
node_darwin.go Fix build on FreeBSD with Go 1.12 2019-03-06 09:41:49 -05:00
node_freebsd.go Fix build on FreeBSD for Go < 1.12 2019-03-16 20:52:37 +01:00
node_freebsd_go111.go Fix build on FreeBSD for Go < 1.12 2019-03-16 20:52:37 +01:00
node_linux.go internal/restic: close os.File after checking for error 2020-03-05 16:22:46 -08:00
node_netbsd.go Fix build on FreeBSD with Go 1.12 2019-03-06 09:41:49 -05:00
node_openbsd.go Fix build on FreeBSD with Go 1.12 2019-03-06 09:41:49 -05:00
node_solaris.go Fix build on FreeBSD with Go 1.12 2019-03-06 09:41:49 -05:00
node_test.go node: Make sure year of all timestamps is valid 2019-04-24 16:39:36 +02:00
node_unix.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
node_unix_test.go Fix test 2018-07-14 11:51:34 +02:00
node_windows.go windows: Use LastWriteTime for ctime and mtime 2019-05-05 14:02:11 +02:00
node_xattr.go Support NetBSD without fuse 2018-06-16 15:55:04 +09:00
progress.go Control progress rate with RESTIC_PROGRESS_FPS env 2017-10-26 14:46:56 +08:00
progress_unix.go Make all signal.Notify channels buffered 2020-03-12 20:59:39 +01:00
progress_unix_with_siginfo.go Make all signal.Notify channels buffered 2020-03-12 20:59:39 +01:00
readerat.go Reworked Backend.Load API to retry errors during ongoing download 2018-02-16 21:12:14 -05:00
repository.go Fix non-intuitive repository behavior 2020-06-11 13:05:23 +02:00
rewind_reader.go Use int64 for the length in the RewindReader 2018-03-04 10:40:42 +01:00
rewind_reader_test.go Use int64 for the length in the RewindReader 2018-03-04 10:40:42 +01:00
snapshot.go Support specifying multiple host flags for various commands 2020-02-26 22:17:59 +01:00
snapshot_find.go Support specifying multiple host flags for various commands 2020-02-26 22:17:59 +01:00
snapshot_group.go Accept both singular and plural for --group-by (#2330) 2019-11-20 19:25:48 +01:00
snapshot_policy.go Support time ranges expressed in hours in snapshot retention policies 2018-11-26 14:27:42 +01:00
snapshot_policy_test.go Support time ranges expressed in hours in snapshot retention policies 2018-11-26 14:27:42 +01:00
snapshot_test.go Remove all dot-imports 2017-10-02 15:06:39 +02:00
tag_list.go remove unused code 2019-07-01 00:24:45 +03:00
testing.go Fix non-intuitive repository behavior 2020-06-11 13:05:23 +02:00
testing_test.go Move restic package to internal/restic 2017-07-24 17:43:32 +02:00
tree.go tree: Add convenience functions 2018-04-22 11:37:05 +02:00
tree_test.go replace ad-hoc context.TODO() with gopts.ctx, so that cancellation 2017-12-03 07:22:14 -05:00