benchmark: Add --databases to benchmark sqlite databases

Rescued from commit 11d6e2e260 which removed
db benchmarks in favor of benchmarking arbitrary git-annex commands. Which
is nice and general, but microbenchmarks are useful too.
This commit is contained in:
Joey Hess 2019-10-29 15:16:15 -04:00
parent 27e10fdbd7
commit 25f912de5b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
9 changed files with 190 additions and 21 deletions

View file

@ -17,6 +17,7 @@ import Data.Maybe
import Data.Char
import qualified Data.ByteString as S
import qualified Data.Text as T
import Control.DeepSeq
import Utility.PartialPrelude
import Key
@ -41,6 +42,9 @@ derivePersistField "SKey"
-- work when it's used in any kind of complex data structure.
newtype IKey = IKey String
instance NFData IKey where
rnf (IKey s) = rnf s
instance Read IKey where
readsPrec _ s = [(IKey s, "")]