Commit graph

26652 commits

Author SHA1 Message Date
Joey Hess
134496b9fb
Merge branch 'master' of ssh://git-annex.branchable.com 2016-01-12 13:09:54 -04:00
Joey Hess
ca2a527e93
add FileKeyIndex to Keys db to optimize getAssociatedKey
This is a schema change so will break any existing keys databases. But,
it's not been released yet, so I'm still able to make such changes.

This speeds up the benchmark quite nicely:

benchmarking keys database/getAssociatedKey from 1000 (hit)
time                 91.65 μs   (91.48 μs .. 91.81 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 91.78 μs   (91.66 μs .. 91.94 μs)
std dev              468.3 ns   (353.1 ns .. 624.3 ns)

benchmarking keys database/getAssociatedKey from 1000 (miss)
time                 53.33 μs   (53.23 μs .. 53.40 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 53.43 μs   (53.36 μs .. 53.53 μs)
std dev              274.2 ns   (211.7 ns .. 361.5 ns)

benchmarking keys database/getAssociatedKey from 10000 (hit)
time                 92.99 μs   (92.74 μs .. 93.27 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 92.90 μs   (92.76 μs .. 93.16 μs)
std dev              608.7 ns   (404.1 ns .. 963.5 ns)

benchmarking keys database/getAssociatedKey from 10000 (miss)
time                 53.12 μs   (52.91 μs .. 53.39 μs)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 52.84 μs   (52.68 μs .. 53.16 μs)
std dev              715.4 ns   (400.4 ns .. 1.370 μs)
2016-01-12 13:07:14 -04:00
Joey Hess
f9c5aa84e0
add database benchmark
The benchmark shows that the database access is quite fast indeed!
And, it scales linearly to the number of keys, with one exception,
getAssociatedKey.

Based on this benchmark, I don't think I need worry about optimising
for cases where all files are locked and the database is mostly empty.
In those cases, database access will be misses, and according to this
benchmark, should add only 50 milliseconds to runtime.

(NB: There may be some overhead to getting the database opened and locking
the handle that this benchmark doesn't see.)

joey@darkstar:~/src/git-annex>./git-annex benchmark
setting up database with 1000
setting up database with 10000
benchmarking keys database/getAssociatedFiles from 1000 (hit)
time                 62.77 μs   (62.70 μs .. 62.85 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 62.81 μs   (62.76 μs .. 62.88 μs)
std dev              201.6 ns   (157.5 ns .. 259.5 ns)

benchmarking keys database/getAssociatedFiles from 1000 (miss)
time                 50.02 μs   (49.97 μs .. 50.07 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 50.09 μs   (50.04 μs .. 50.17 μs)
std dev              206.7 ns   (133.8 ns .. 295.3 ns)

benchmarking keys database/getAssociatedKey from 1000 (hit)
time                 211.2 μs   (210.5 μs .. 212.3 μs)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 211.0 μs   (210.7 μs .. 212.0 μs)
std dev              1.685 μs   (334.4 ns .. 3.517 μs)

benchmarking keys database/getAssociatedKey from 1000 (miss)
time                 173.5 μs   (172.7 μs .. 174.2 μs)
                     1.000 R²   (0.999 R² .. 1.000 R²)
mean                 173.7 μs   (173.0 μs .. 175.5 μs)
std dev              3.833 μs   (1.858 μs .. 6.617 μs)
variance introduced by outliers: 16% (moderately inflated)

benchmarking keys database/getAssociatedFiles from 10000 (hit)
time                 64.01 μs   (63.84 μs .. 64.18 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 64.85 μs   (64.34 μs .. 66.02 μs)
std dev              2.433 μs   (547.6 ns .. 4.652 μs)
variance introduced by outliers: 40% (moderately inflated)

benchmarking keys database/getAssociatedFiles from 10000 (miss)
time                 50.33 μs   (50.28 μs .. 50.39 μs)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 50.32 μs   (50.26 μs .. 50.38 μs)
std dev              202.7 ns   (167.6 ns .. 252.0 ns)

benchmarking keys database/getAssociatedKey from 10000 (hit)
time                 1.142 ms   (1.139 ms .. 1.146 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 1.142 ms   (1.140 ms .. 1.144 ms)
std dev              7.142 μs   (4.994 μs .. 10.98 μs)

benchmarking keys database/getAssociatedKey from 10000 (miss)
time                 1.094 ms   (1.092 ms .. 1.096 ms)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 1.095 ms   (1.095 ms .. 1.097 ms)
std dev              4.277 μs   (2.591 μs .. 7.228 μs)
2016-01-12 13:07:03 -04:00
jhannwong@c9c7a67b5632a4bbc0c959cfeb3d340e02f28565
e6e4407336 removed 2016-01-12 04:19:36 +00:00
sameerds
99fdd14f9f Added a comment: cygwin/msys-independent fix? 2016-01-12 04:07:40 +00:00
jhannwong@c9c7a67b5632a4bbc0c959cfeb3d340e02f28565
4b075509f2 Added a comment: Does not work 2016-01-12 03:52:58 +00:00
https://me.yahoo.com/a/EbvxpTI_xP9Aod7Mg4cwGhgjrCrdM5s-#7c0f4
9bc2b9ad57 Added a comment 2016-01-12 03:35:15 +00:00
https://me.yahoo.com/a/EbvxpTI_xP9Aod7Mg4cwGhgjrCrdM5s-#7c0f4
ac17961c43 initial report 2016-01-12 03:30:25 +00:00
emanuele.ruffaldi@56b9c9a5c1f873994b869248e9b53aa20f437d20
d003501fab 2016-01-12 00:32:31 +00:00
https://me.yahoo.com/a/EbvxpTI_xP9Aod7Mg4cwGhgjrCrdM5s-#7c0f4
d73469a87f 2016-01-11 22:10:57 +00:00
Joey Hess
8111eb21e6
split out raw sql interface 2016-01-11 15:52:11 -04:00
Joey Hess
2a27c77170
comment 2016-01-11 12:52:11 -04:00
https://me.yahoo.com/a/EbvxpTI_xP9Aod7Mg4cwGhgjrCrdM5s-#7c0f4
e540c3ffc5 2016-01-11 16:47:52 +00:00
https://me.yahoo.com/a/EbvxpTI_xP9Aod7Mg4cwGhgjrCrdM5s-#7c0f4
7a5969cc92 2016-01-11 16:47:04 +00:00
Joey Hess
bf776d6557
comment 2016-01-11 12:38:38 -04:00
Joey Hess
7ace93b922
comment 2016-01-11 12:34:01 -04:00
Joey Hess
c579b9800a
comment 2016-01-11 12:30:52 -04:00
Joey Hess
142803a90d
comment 2016-01-11 12:29:54 -04:00
Joey Hess
0021ae4485
commet 2016-01-11 12:21:45 -04:00
Joey Hess
dbdce142d4
comment 2016-01-11 12:20:40 -04:00
Joey Hess
1f6f9a8d34
When annex.http-headers is used to set the User-Agent header, avoid sending User-Agent: git-annex 2016-01-11 12:10:38 -04:00
pkitslaar
7cf6299888 Added a comment: Possible fix for rsync windows paths 2016-01-11 10:25:23 +00:00
Pieter Kitslaar
6cd134ade1 Added new toMSYS2Path function for use with rsync on Windows. 2016-01-11 11:18:58 +01:00
git-annex.branchable.com@69b3f2da2837a3d9de8eab0b93771008294b7d69
4caaa15f76 Added a comment 2016-01-10 12:06:53 +00:00
pkitslaar
bc1751b109 removed 2016-01-10 07:50:56 +00:00
pkitslaar
c3f0907667 Added a comment: Same here 2016-01-10 07:50:14 +00:00
pkitslaar
9e199a28f5 Added a comment: Same here 2016-01-10 07:49:52 +00:00
wsha.code+ga@b38779424f41c5701bbe5937340be43ff1474b2d
bd1ce3ef0d Added a comment 2016-01-10 03:08:24 +00:00
G.nius.ck@d885edcfde63422ee84e5ee501b7aa545e91298d
6bdbc06317 Added a comment: What do you mean by "git-annex" branch? 2016-01-09 16:04:30 +00:00
https://openid.stackexchange.com/user/e65e6d0e-58ba-41de-84cc-1f2ba54cf574
e4e76c881a Added a comment: Copy from .git/config 2016-01-09 06:44:59 +00:00
mark@6b90344cdab3158eacb94a3944460d138afc9bef
f285579729 Added a comment: Special remotes 2016-01-08 21:12:45 +00:00
Joey Hess
dc58825bed
link 2016-01-08 16:37:47 -04:00
Joey Hess
dd4549e78b
layout 2016-01-08 16:36:11 -04:00
Joey Hess
2f41bbebfb
Merge branch 'master' of ssh://git-annex.branchable.com 2016-01-08 16:35:15 -04:00
Joey Hess
8be45cbf0a
devblog 2016-01-08 16:32:22 -04:00
Joey Hess
55ad30d1d9
update 2016-01-08 16:30:31 -04:00
Joey Hess
8e958c3f4b
defer deletion of test repos until end, fixes sqlite crash
The crash turned out to be caused by the sqlite database being deleted out
from under sqlite before it was done with it. Since multiple git_annex
calls are done in the same process while running the test suite, the
DbHandle could linger until GCed, and the test repo, and thus sqlite
database be deleted before the workerThread was done.
2016-01-08 16:14:39 -04:00
Joey Hess
bafcbe95c3
fix one more test failure with v6 unlocked file merge conflict resolution 2016-01-08 15:23:15 -04:00
oliverconzen@8cff8c5ab3868de177f748566f90c79720f9cf4b
1b91c07834 Added a comment 2016-01-08 19:21:28 +00:00
Joey Hess
51bc32e21e
better fix for slash in view metadata
The homomorphs are back, just encoded such that it doesn't crash in LANG=C

However, I noticed a bug in the old escaping; [pseudoSlash] was escaped the
same as ['/','/']. Fixed by using '%' to escape pseudoSlash. Which requires
doubling '%' to escape it, but that's already done in the escaping of
worktree filenames in a view, so is probably ok.
2016-01-08 13:55:35 -04:00
Joey Hess
42619e2231
view: Avoid using cute unicode homomorphs for '/' and '\' and instead use ugly escaping, as the unicode method doesn't work on non-unicode supporting systems. 2016-01-08 12:45:32 -04:00
Joey Hess
6b963426a0
link to new tip about encryption 2016-01-08 11:48:53 -04:00
Alan
498bd6fb43 2016-01-08 12:53:20 +00:00
wsha.code+ga@b38779424f41c5701bbe5937340be43ff1474b2d
e94ef9bcb7 2016-01-08 07:38:01 +00:00
anntzer.lee@b6e099b6ef8ba8b53005ca7f0e473e825001129b
f0a54b40de Added a comment 2016-01-08 07:35:21 +00:00
sameerds
5527ea62b8 Added a comment: bump! 2016-01-08 07:31:18 +00:00
wsha.code+ga@b38779424f41c5701bbe5937340be43ff1474b2d
f381b5f952 Added a comment 2016-01-08 06:56:02 +00:00
philippgodbersen@b5b6f1c85f129c3bbf300214eb690810f9c582b6
219b1fc3f9 2016-01-07 23:27:10 +00:00
Joey Hess
65b0358444
response 2016-01-07 18:22:51 -04:00
Joey Hess
d6fe7fdd7d
rekey: No longer copies over urls from the old to the new key.
It makes sense for migrate to do that, but not for this low-level (and
little used) plumbing command to.
2016-01-07 18:06:20 -04:00