git-annex/Command
Joey Hess 423fffcd41
change keys database to use IKey type with more efficient serialization
This breaks any existing keys database!

IKey serializes more efficiently than SKey, although this limits the
use of its Read/Show instances.

This makes the keys database use less disk space, and so should be a win.

Updated benchmark:

benchmarking keys database/getAssociatedFiles from 1000 (hit)
time                 64.04 μs   (63.95 μs .. 64.13 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 64.02 μs   (63.96 μs .. 64.08 μs)
std dev              218.2 ns   (172.5 ns .. 299.3 ns)

benchmarking keys database/getAssociatedFiles from 1000 (miss)
time                 52.53 μs   (52.18 μs .. 53.21 μs)
                     0.999 R²   (0.998 R² .. 1.000 R²)
mean                 52.31 μs   (52.18 μs .. 52.91 μs)
std dev              734.6 ns   (206.2 ns .. 1.623 μs)

benchmarking keys database/getAssociatedKey from 1000 (hit)
time                 64.60 μs   (64.46 μs .. 64.77 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 64.74 μs   (64.57 μs .. 65.20 μs)
std dev              900.2 ns   (389.7 ns .. 1.733 μs)

benchmarking keys database/getAssociatedKey from 1000 (miss)
time                 52.46 μs   (52.29 μs .. 52.68 μs)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 52.63 μs   (52.35 μs .. 53.37 μs)
std dev              1.362 μs   (562.7 ns .. 2.608 μs)
variance introduced by outliers: 24% (moderately inflated)

benchmarking keys database/addAssociatedFile to 1000 (old)
time                 487.3 μs   (484.7 μs .. 490.1 μs)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 490.9 μs   (487.8 μs .. 496.5 μs)
std dev              13.95 μs   (6.841 μs .. 22.03 μs)
variance introduced by outliers: 20% (moderately inflated)

benchmarking keys database/addAssociatedFile to 1000 (new)
time                 6.633 ms   (5.741 ms .. 7.751 ms)
                     0.905 R²   (0.850 R² .. 0.965 R²)
mean                 8.252 ms   (7.803 ms .. 8.602 ms)
std dev              1.126 ms   (900.3 μs .. 1.430 ms)
variance introduced by outliers: 72% (severely inflated)

benchmarking keys database/getAssociatedFiles from 10000 (hit)
time                 65.36 μs   (64.71 μs .. 66.37 μs)
                     0.998 R²   (0.995 R² .. 1.000 R²)
mean                 65.28 μs   (64.72 μs .. 66.45 μs)
std dev              2.576 μs   (920.8 ns .. 4.122 μs)
variance introduced by outliers: 42% (moderately inflated)

benchmarking keys database/getAssociatedFiles from 10000 (miss)
time                 52.34 μs   (52.25 μs .. 52.45 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 52.49 μs   (52.42 μs .. 52.59 μs)
std dev              255.4 ns   (205.8 ns .. 312.9 ns)

benchmarking keys database/getAssociatedKey from 10000 (hit)
time                 64.76 μs   (64.67 μs .. 64.84 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 64.67 μs   (64.62 μs .. 64.72 μs)
std dev              177.3 ns   (148.1 ns .. 217.1 ns)

benchmarking keys database/getAssociatedKey from 10000 (miss)
time                 52.75 μs   (52.66 μs .. 52.82 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 52.69 μs   (52.63 μs .. 52.75 μs)
std dev              210.6 ns   (173.7 ns .. 265.9 ns)

benchmarking keys database/addAssociatedFile to 10000 (old)
time                 489.7 μs   (488.7 μs .. 490.7 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 490.4 μs   (489.6 μs .. 492.2 μs)
std dev              3.990 μs   (2.435 μs .. 7.604 μs)

benchmarking keys database/addAssociatedFile to 10000 (new)
time                 9.994 ms   (9.186 ms .. 10.74 ms)
                     0.959 R²   (0.928 R² .. 0.979 R²)
mean                 9.906 ms   (9.343 ms .. 10.40 ms)
std dev              1.384 ms   (1.051 ms .. 2.100 ms)
variance introduced by outliers: 69% (severely inflated)
2016-01-12 14:01:50 -04:00
..
Add.hs avoid confusing git with a modified ctime in clean filter 2016-01-07 17:48:04 -04:00
AddUnused.hs refactoring 2015-12-22 13:42:58 -04:00
AddUrl.hs Merge branch 'master' into smudge 2015-12-22 18:10:40 -04:00
Assistant.hs converted Assistant and Watch; avoid duplicate arg parsing for no repo mode 2015-07-13 11:42:42 -04:00
Benchmark.hs change keys database to use IKey type with more efficient serialization 2016-01-12 14:01:50 -04:00
CheckPresentKey.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Commit.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
ConfigList.hs Use git-annex init --version=6 to get v6 for now 2015-12-15 17:17:13 -04:00
ContentLocation.hs converted ContentLocation, ExampleKey, LookupKey 2015-07-11 20:43:45 -04:00
Copy.hs missed adding allowConcurrentOutput here 2015-11-06 13:41:26 -04:00
Dead.hs convert Dead, and allow multiple --key options 2015-07-13 10:26:54 -04:00
Describe.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
DiffDriver.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Direct.hs don't let git-annex direct be run in a v6 repo 2015-12-04 16:33:09 -04:00
Drop.hs drop -Jn 2015-11-04 17:13:20 -04:00
DropKey.hs fix local dropping to not require extra locking of copies, but only that the local copy be locked for removal 2015-10-09 15:48:02 -04:00
DropUnused.hs dropunused: Make more robust when trying to drop an object that has already been dropped. 2015-12-03 15:58:00 -04:00
EnableRemote.hs enableremote: List uuids and descriptions of remotes that can be enabled, and accept either the uuid or the description in leu if the name. 2015-10-26 14:55:40 -04:00
ExamineKey.hs converted ContentLocation, ExampleKey, LookupKey 2015-07-11 20:43:45 -04:00
Expire.hs convert Expire 2015-07-10 16:26:23 -04:00
Find.hs convert FindRef 2015-07-10 20:38:11 -04:00
FindRef.hs convert FindRef 2015-07-10 20:38:11 -04:00
Fix.hs fix file perms after breaking hard link 2015-12-27 16:12:48 -04:00
Forget.hs converted Forget and TestRemote 2015-07-11 00:42:32 -04:00
FromKey.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Fsck.hs persistent-sqlite is now a hard build dependency, since v6 repository mode needs it. 2015-12-26 13:00:52 -04:00
FuzzTest.hs wip 2015-07-09 16:05:45 -04:00
GCryptSetup.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Get.hs arrange for regional output manager to run when -J is enabled 2015-11-04 16:22:43 -04:00
Group.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
GroupWanted.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Help.hs let optparse-applicative handle the usage display when run w/o command or bad command 2015-07-09 11:52:47 -04:00
Import.hs addurl, importfeed: Changed to honor annex.largefiles settings, when the content of the url is downloaded. (Not when using --fast or --relaxed.) 2015-12-02 15:12:33 -04:00
ImportFeed.hs use action, not sideAction 2015-10-11 13:29:44 -04:00
InAnnex.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Indirect.hs refactoring 2015-12-22 13:42:58 -04:00
Info.hs info --json: Improve json for "backend usage", using a nested object with fields for each backend instead of the previous weird nested lists. This may break existing parsers of this json output, if there were any. 2016-01-01 16:33:05 -04:00
Init.hs Use git-annex init --version=6 to get v6 for now 2015-12-15 17:17:13 -04:00
InitRemote.hs Special remotes configured with autoenable=true will be automatically enabled when git-annex init is run. 2015-09-14 14:49:48 -04:00
List.hs convert List 2015-07-10 20:46:48 -04:00
Lock.hs fix test failure locking an unlocked not present file 2016-01-06 16:01:52 -04:00
LockContent.hs implement lockContent for ssh remotes 2015-10-09 16:55:41 -04:00
Log.hs converted Log 2015-07-13 10:44:51 -04:00
LookupKey.hs converted ContentLocation, ExampleKey, LookupKey 2015-07-11 20:43:45 -04:00
Map.hs map: Improve display of git remotes with non-ssh urls, including http and gcrypt. 2015-11-18 15:08:55 -04:00
Merge.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
MetaData.hs metadata: Fix reversion introduced in 5.20150727 that caused display of metadata to not work. 2015-08-11 13:19:01 -04:00
Migrate.hs rekey: No longer copies over urls from the old to the new key. 2016-01-07 18:06:20 -04:00
Mirror.hs arrange for regional output manager to run when -J is enabled 2015-11-04 16:22:43 -04:00
Move.hs arrange for regional output manager to run when -J is enabled 2015-11-04 16:22:43 -04:00
NotifyChanges.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
NumCopies.hs avoid using print action, which is reserved for debugging 2015-10-06 15:26:42 -04:00
PreCommit.hs annex.thin 2015-12-27 15:59:59 -04:00
Proxy.hs unused import 2015-08-05 13:25:03 -04:00
ReadPresentKey.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
RecvKey.hs add unlocked flag for git-annex-shell recvkey 2015-12-26 13:59:27 -04:00
RegisterUrl.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Reinit.hs Use git-annex init --version=6 to get v6 for now 2015-12-15 17:17:13 -04:00
Reinject.hs other 80% of avoding verification when hard linking to objects in shared repo 2015-10-02 14:35:12 -04:00
ReKey.hs rekey: No longer copies over urls from the old to the new key. 2016-01-07 18:06:20 -04:00
RemoteDaemon.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Repair.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Required.hs started converting to use optparse-applicative 2015-07-08 13:36:25 -04:00
ResolveMerge.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
RmUrl.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Schedule.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Semitrust.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
SendKey.hs add some debugs to get timings 2015-08-13 16:13:16 -04:00
SetKey.hs other 80% of avoding verification when hard linking to objects in shared repo 2015-10-02 14:35:12 -04:00
SetPresentKey.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Smudge.hs avoid confusing git with a modified ctime in clean filter 2016-01-07 17:48:04 -04:00
Status.hs status: On crippled filesystems, was displaying M for all annexed files that were present. Probably caused by a change to what git status displays in this situation. Fixed by treating files git thinks are modified the same as typechanged files. 2015-12-19 13:36:40 -04:00
Sync.hs arrange for regional output manager to run when -J is enabled 2015-11-04 16:22:43 -04:00
Test.hs wire tasty's option parser into the main program option parser 2015-07-13 13:20:10 -04:00
TestRemote.hs use action, not sideAction 2015-10-11 13:29:44 -04:00
TransferInfo.hs converted copy and move 2015-07-09 15:23:14 -04:00
TransferKey.hs Do verification of checksums of annex objects downloaded from remotes. 2015-10-01 15:56:39 -04:00
TransferKeys.hs Do verification of checksums of annex objects downloaded from remotes. 2015-10-01 15:56:39 -04:00
Trust.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Unannex.hs use TopFilePath for associated files 2016-01-05 17:22:19 -04:00
Undo.hs support pointer files 2015-12-07 15:35:36 -04:00
Ungroup.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Uninit.hs fix local dropping to not require extra locking of copies, but only that the local copy be locked for removal 2015-10-09 15:48:02 -04:00
Unlock.hs annex.thin 2015-12-27 15:59:59 -04:00
Untrust.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Unused.hs unused: deal with v6 unlocked file that is implicitly ingested by git diff etc 2016-01-06 22:11:21 -04:00
Upgrade.hs reorg 2015-12-15 15:34:28 -04:00
VAdd.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
VCycle.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Version.hs add v6; keep v5 working for now and manual upgrade 2015-12-04 16:14:48 -04:00
VFilter.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Vicfg.hs converted ViCfg (trivially) 2015-07-10 20:40:30 -04:00
View.hs use action, not sideAction 2015-10-11 13:29:44 -04:00
VPop.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Wanted.hs convert all commands to work with optparse-applicative 2015-07-08 15:08:02 -04:00
Watch.hs converted Assistant and Watch; avoid duplicate arg parsing for no repo mode 2015-07-13 11:42:42 -04:00
WebApp.hs convert WebApp; avoid duplicate arg parsing for no repo mode 2015-07-13 11:53:42 -04:00
Whereis.hs whereis --json: Make url list be included in machine-parseable form. 2016-01-06 12:33:32 -04:00
XMPPGit.hs converted Assistant and Watch; avoid duplicate arg parsing for no repo mode 2015-07-13 11:42:42 -04:00