From 92e1bb250b450bfa7fc10f39705072d32cf6927b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 21 Nov 2019 17:38:58 -0400 Subject: [PATCH 1/4] simplify the name of the test cases --- CHANGELOG | 2 +- Database/Benchmark.hs | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5935c5f32f..b8bdd752c6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,7 +13,7 @@ git-annex (7.20191115) UNRELEASED; urgency=medium * benchmark: Changed --databases to take a parameter specifiying the size of the database to benchmark. * benchmark --databases: Display size of the populated database. - * benchmark --databases: Improve the "addAssociatedFile to (new)" + * benchmark --databases: Improve the "addAssociatedFile (new)" benchmark to really add new values, not overwriting old values. * Windows: Fix handling of changes to time zone. (Used to work but was broken in version 7.20181031.) diff --git a/Database/Benchmark.hs b/Database/Benchmark.hs index da2a693395..906337ff3a 100644 --- a/Database/Benchmark.hs +++ b/Database/Benchmark.hs @@ -49,33 +49,33 @@ benchmarkDbs _ = error "not built with criterion, cannot benchmark" #ifdef WITH_BENCHMARK getAssociatedFilesHitBench :: BenchDb -> Benchmark -getAssociatedFilesHitBench (BenchDb h num) = bench ("getAssociatedFiles from " ++ show num ++ " (hit)") $ nfIO $ do +getAssociatedFilesHitBench (BenchDb h num) = bench ("getAssociatedFiles (hit)") $ nfIO $ do n <- getStdRandom (randomR (1,num)) SQL.getAssociatedFiles (toIKey (keyN n)) (SQL.ReadHandle h) getAssociatedFilesMissBench :: BenchDb -> Benchmark -getAssociatedFilesMissBench (BenchDb h num) = bench ("getAssociatedFiles from " ++ show num ++ " (miss)") $ nfIO $ +getAssociatedFilesMissBench (BenchDb h _num) = bench ("getAssociatedFiles (miss)") $ nfIO $ SQL.getAssociatedFiles (toIKey keyMiss) (SQL.ReadHandle h) getAssociatedKeyHitBench :: BenchDb -> Benchmark -getAssociatedKeyHitBench (BenchDb h num) = bench ("getAssociatedKey from " ++ show num ++ " (hit)") $ nfIO $ do +getAssociatedKeyHitBench (BenchDb h num) = bench ("getAssociatedKey (hit)") $ nfIO $ do n <- getStdRandom (randomR (1,num)) -- fromIKey because this ends up being used to get a Key map fromIKey <$> SQL.getAssociatedKey (fileN n) (SQL.ReadHandle h) getAssociatedKeyMissBench :: BenchDb -> Benchmark -getAssociatedKeyMissBench (BenchDb h num) = bench ("getAssociatedKey from " ++ show num ++ " (miss)") $ nfIO $ +getAssociatedKeyMissBench (BenchDb h _num) = bench ("getAssociatedKey from (miss)") $ nfIO $ -- fromIKey because this ends up being used to get a Key map fromIKey <$> SQL.getAssociatedKey fileMiss (SQL.ReadHandle h) addAssociatedFileOldBench :: BenchDb -> Benchmark -addAssociatedFileOldBench (BenchDb h num) = bench ("addAssociatedFile to " ++ show num ++ " (old)") $ nfIO $ do +addAssociatedFileOldBench (BenchDb h num) = bench ("addAssociatedFile to (old)") $ nfIO $ do n <- getStdRandom (randomR (1,num)) SQL.addAssociatedFile (toIKey (keyN n)) (fileN n) (SQL.WriteHandle h) H.flushDbQueue h addAssociatedFileNewBench :: BenchDb -> Benchmark -addAssociatedFileNewBench (BenchDb h num) = bench ("addAssociatedFile to " ++ show num ++ " (new)") $ nfIO $ do +addAssociatedFileNewBench (BenchDb h num) = bench ("addAssociatedFile to (new)") $ nfIO $ do n <- getStdRandom (randomR (1,num)) SQL.addAssociatedFile (toIKey (keyN n)) (fileN (num+n)) (SQL.WriteHandle h) H.flushDbQueue h From cf2e23d39cffd436c7421ee973d8a8f0c1ee7b69 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 22 Nov 2019 12:08:41 -0400 Subject: [PATCH 2/4] close not viable --- ..._through_the_clean__47__smudge_filter.mdwn | 2 ++ ..._c614ab0aeab4a8d27d3a1da3db3c7e05._comment | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 doc/todo/only_pass_unlocked_files_through_the_clean__47__smudge_filter/comment_1_c614ab0aeab4a8d27d3a1da3db3c7e05._comment diff --git a/doc/todo/only_pass_unlocked_files_through_the_clean__47__smudge_filter.mdwn b/doc/todo/only_pass_unlocked_files_through_the_clean__47__smudge_filter.mdwn index 764be9e206..873edf8c61 100644 --- a/doc/todo/only_pass_unlocked_files_through_the_clean__47__smudge_filter.mdwn +++ b/doc/todo/only_pass_unlocked_files_through_the_clean__47__smudge_filter.mdwn @@ -1 +1,3 @@ Right now, non-annexed files get passed through the `annex` clean/smudge filter (see [[forum/Adding_files_to_git__58___Very_long___34__recording_state_in_git__34___phase]]). It would be better if `git-annex` configure the filter only for the annexed unlocked files, in the `.gitattributes` file at the root of the repository. + +> not a viable solution, [[done]] --[[Joey]] diff --git a/doc/todo/only_pass_unlocked_files_through_the_clean__47__smudge_filter/comment_1_c614ab0aeab4a8d27d3a1da3db3c7e05._comment b/doc/todo/only_pass_unlocked_files_through_the_clean__47__smudge_filter/comment_1_c614ab0aeab4a8d27d3a1da3db3c7e05._comment new file mode 100644 index 0000000000..4996e933a6 --- /dev/null +++ b/doc/todo/only_pass_unlocked_files_through_the_clean__47__smudge_filter/comment_1_c614ab0aeab4a8d27d3a1da3db3c7e05._comment @@ -0,0 +1,19 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2019-11-22T16:01:26Z" + content=""" +It immediately occurs to me that the proposal would break this: + + git annex add foo + git annex add bar + git annex unlock bar + git mv bar foo + git commit -m add + +Since foo was a locked file, gitattributes would prevent from being +smudged, so the large content that was in bar gets committed directly to git. + +The right solution is to improve the smudge/clean filter interface to it's +not so slow, which there is copious discussion of elsewhere. +"""]] From 93789cbf40b4141ffac45156b2535f0bf9df06c4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 22 Nov 2019 12:11:04 -0400 Subject: [PATCH 3/4] close as dup --- doc/todo/split_off_clean__47__smudge_filter__63__.mdwn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/todo/split_off_clean__47__smudge_filter__63__.mdwn b/doc/todo/split_off_clean__47__smudge_filter__63__.mdwn index 161cdb577a..c568d9b466 100644 --- a/doc/todo/split_off_clean__47__smudge_filter__63__.mdwn +++ b/doc/todo/split_off_clean__47__smudge_filter__63__.mdwn @@ -1 +1,5 @@ If running the clean/smudge filter once per file is a [[bottleneck|forum/Adding_files_to_git__58___Very_long___34__recording_state_in_git__34___phase]], might it speed things up to split them off into something more lightweight than the full git-annex binary? + +> This is a duplicate of stuff discussed at +> [[todo/git_smudge_clean_interface_suboptiomal]], so closing. [[done]] +> --[[Joey]] From b82ab214682d424aeb90bc49d483933c64c1116d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 22 Nov 2019 12:35:57 -0400 Subject: [PATCH 4/4] missed an export --- Utility/LinuxMkLibs.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/Utility/LinuxMkLibs.hs b/Utility/LinuxMkLibs.hs index 9f042dc2eb..8782ead6be 100644 --- a/Utility/LinuxMkLibs.hs +++ b/Utility/LinuxMkLibs.hs @@ -9,6 +9,7 @@ module Utility.LinuxMkLibs ( installLib, parseLdd, glibcLibs, + inTop, ) where import Utility.PartialPrelude