summaryrefslogtreecommitdiffhomepage
path: root/ExpensiveHash.hs
diff options
context:
space:
mode:
Diffstat (limited to 'ExpensiveHash.hs')
-rw-r--r--ExpensiveHash.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/ExpensiveHash.hs b/ExpensiveHash.hs
index abe89ca..fed6d18 100644
--- a/ExpensiveHash.hs
+++ b/ExpensiveHash.hs
@@ -80,10 +80,16 @@ benchmarkTunables tunables = do
let normalrounds = fromIntegral $
256 * randomSaltBytes (keyEncryptionKeyTunable tunables)
putStrLn $ "Benchmarking 16/" ++ show normalrounds ++ " rounds of key encryption key hash..."
- print =<< benchmarkExpensiveHash 16
+ r <- benchmarkExpensiveHash 16
(keyEncryptionKeyHash $ keyEncryptionKeyTunable tunables)
(mapCost (`div` (normalrounds `div` 16)) $ randomSaltBytesBruteForceCost $ keyEncryptionKeyTunable tunables)
-
+ print r
+ putStrLn $ "Estimated time for " ++ show normalrounds ++ " rounds of key encryption key hash..."
+ print $ BenchmarkResult
+ { expectedBenchmark = mapCost (* 16) (expectedBenchmark r)
+ , actualBenchmark = mapCost (* 16) (actualBenchmark r)
+ }
+
putStrLn "Benchmarking 1 round of name generation hash..."
print =<< benchmarkExpensiveHash 1
(nameGenerationHash $ nameGenerationTunable tunables)