Last active
February 22, 2024 16:51
-
-
Save andradefil/951a0320f35879e95193123d5bfb87c7 to your computer and use it in GitHub Desktop.
Datomic restore parameters string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Given a set of configuration for restore, and a restore function | |
;; returns the restore parameters string to be used | |
;; System Parameters | |
;; config a (baseline) config b(100x more) config c(500x more) | |
;; ############################################################################################## | |
;; datomic.s3BackupConcurrency 25 2500 12500 | |
;; datomic.backupBranchConcurrency 32 3200 16000 | |
;; datomic.writeConcurrency 4 400 2000 | |
;; datomic.readConcurrency 8 800 4000 | |
(def restore-config-baseline | |
[[:datomic.s3BackupConcurrency 25] | |
[:datomic.fileBackupConcurrency 5] | |
[:datomic.backupBranchConcurrency 32] | |
[:datomic.writeConcurrency 4] | |
[:datomic..readConcurrency 8]]) | |
(def restore-config-100x | |
[[:datomic.s3BackupConcurrency 2500] | |
[:datomic.fileBackupConcurrency 500] | |
[:datomic.writeConcurrency 3200] | |
[:datomic.readConcurrency 800]]) | |
(def restore-config-500x | |
[[:datomic.s3BackupConcurrency 12500] | |
[:datomic.fileBackupConcurrency 2500] | |
[:datomic.writeConcurrency 2000] | |
[:datomic.readConcurrency 4000]]) | |
(defn string->%s=%s [k v] (format "%s=%s" k v)) | |
(defn keyword->%s=%s [k v] (format "%s=%s" (name k) v)) | |
(defn default->%s=%s [k v] nil) | |
(def params-predicate | |
{[java.lang.String java.lang.String] string->%s=%s | |
[java.lang.String java.lang.Long] string->%s=%s | |
[java.lang.String java.lang.Double] string->%s=%s | |
[clojure.lang.Keyword java.lang.String] keyword->%s=%s | |
[clojure.lang.Keyword java.lang.Long] keyword->%s=%s | |
[clojure.lang.Keyword java.lang.Double] keyword->%s=%s}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment