This file contains hidden or 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
#!/usr/bin/env bash | |
function metric-grep () { | |
cat *.log | perl -n -e 'print "$1 $2\n" if /^(.*) INFO .* '"$1"' {.*?'"$2"' (.*?)\}/' | less | |
} | |
# call like: | |
# metric-grep :StorageGetMsec | |
# output example |
This file contains hidden or 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
(ns merge.core | |
(:import datomic.Util) | |
(require [datomic.api :as d] | |
[clojure.java.io :as io])) | |
(def db-uri "datomic:dev://localhost:4334/merge") | |
(d/create-database db-uri) | |
(def conn (d/connect db-uri)) | |
This file contains hidden or 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
(ns inmemperformance.core | |
(require [datomic.api :as d] | |
[clojure.java.io :as io])) | |
(def db-uri "datomic:mem://memory") | |
(d/delete-database db-uri) | |
(d/create-database db-uri) | |
(def conn (d/connect db-uri)) | |
This file contains hidden or 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
(ns inmemperformance.core | |
(require [datomic.api :as d] | |
[clojure.java.io :as io])) | |
(def db-uri "datomic:mem://memory") | |
(d/delete-database db-uri) | |
(d/create-database db-uri) | |
(def conn (d/connect db-uri)) | |
This file contains hidden or 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
(ns intlong.core | |
(:import datomic.Util) | |
(require [datomic.api :as d] | |
[clojure.java.io :as io])) | |
(def db-uri "datomic:free://localhost:4334/intlong") | |
(d/create-database db-uri) | |
(def conn (d/connect db-uri)) | |
; Schema |
This file contains hidden or 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
;;google group discussion link https://groups.google.com/forum/#!topic/datomic/m6vSa6CjqjQ | |
(ns stringtemp.core | |
(:import datomic.Util) | |
(require [datomic.api :as d] | |
[clojure.java.io :as io])) | |
;;Create the DB | |
(def db-uri "datomic:dev://localhost:4334/stringtemp") | |
(d/create-database db-uri) |
This file contains hidden or 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
The Datomic Pro peer can create the following CloudWatch metrics: | |
-----------------------------------PEER METRICS | |
|-------------------------------+------------+---------------+-----------------------------------------------------------------------------+ | |
| Metric | Units | Statistic | Description | | |
|-------------------------------+------------+---------------+-----------------------------------------------------------------------------+ | |
| AvailableMB | MB | minimum | unused RAM on peer * | |
This file contains hidden or 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
The Datomic Pro peer can create the following CloudWatch metrics: | |
-----------------------------------PEER METRICS | |
|-------------------------------+------------+---------------+-----------------------------------------------------------------------------+ | |
| Metric | Units | Statistic | Description | | |
|-------------------------------+------------+---------------+-----------------------------------------------------------------------------+ | |
| AvailableMB | MB | minimum | unused RAM on peer * | |
This file contains hidden or 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
/target | |
/classes | |
/checkouts | |
pom.xml | |
pom.xml.asc | |
*.jar | |
*.class | |
/.lein-* | |
/.nrepl-port | |
.hgignore |
This file contains hidden or 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
;****How to Merge two attributes in Datomic.**** | |
; | |
;Our database has recorded two attributes for a user. The user's e-mail and the users username. | |
;The username is required to be the e-mail for the user. Due to a design decision, e-mails will no longer | |
;be recorded. As such we need to depricate the e-mail attribute and merge it to our username attribute to ensure | |
;all e-mails represent usernames. | |
; | |
;The steps to this process are as follows: | |
; | |
;1. Rename the old attribute (i.e. :user/email to :user/email-deprecated) |
OlderNewer