Skip to content

Instantly share code, notes, and snippets.

@Jaretbinford
Jaretbinford / benchmarkresults.clj
Created March 10, 2017 19:07
Using 5561 transactor local dev
Starting nREPL server...
/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java -Dfile.encoding=UTF-8 -Dpython.cachedir.skip=true -XX:MaxPermSize=500M -verbose:gc -XX:+PrintGCDetails -Xloggc:gclog -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=20 -XX:GCLogFileSize=128M -XX:+PrintGCDateStamps -XX:+HeapDumpOnOutOfMemoryError -Xms2G -XX:-OmitStackTraceInFastThrow -Xmx2G -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dclojure.compile.path=/Users/jbin/Desktop/Jaret/Projects/workproof/pullperf/Cook/scheduler/target/classes -Dcook.version=1.0.1-SNAPSHOT -Dclojure.debug=false -Didea.launcher.port=7537 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA CE.app/Contents/bin" -classpath "/Users/jbin/Desktop/Jaret/Projects/workproof/pullperf/Cook/scheduler/test:/Users/jbin/Desktop/Jaret/Projects/workproof/pullperf/Cook/scheduler/src:/Users/jbin/Desktop/Jaret/Projects/workproof/pullperf/Cook/scheduler/test-resources:/Users/jbin/Desktop/Jaret/Projects/work
@Jaretbinford
Jaretbinford / entityQuery
Created June 2, 2017 14:50
Re-create for case
(ns entitytest
(:require [clojure.core.async :refer (<!!)]
[datomic.client :as client]
[datomic.api :as d]))
(def db-uri "datomic:dev://localhost:4334/entity")
(d/create-database db-uri)
(def conn (d/connect db-uri))
@Jaretbinford
Jaretbinford / diff.txt
Created August 1, 2017 14:46
Two directories
$ diff -rq ~/Downloads/datomic-console-0.1.216 ~/Downloads/datomic-console-0.1.214
Files /Users/jbin/Downloads/datomic-console-0.1.216/README-CONSOLE.md and /Users/jbin/Downloads/datomic-console-0.1.214/README-CONSOLE.md differ
Only in /Users/jbin/Downloads/datomic-console-0.1.214/lib/console: datomic-console-0.1.214.jar
Only in /Users/jbin/Downloads/datomic-console-0.1.216/lib/console: datomic-console-0.1.216.jar
Only in /Users/jbin/Downloads/datomic-console-0.1.214/lib/console: jetty-util-8.1.11.v20130520.jar
Only in /Users/jbin/Downloads/datomic-console-0.1.214/lib/console: jetty-webapp-8.1.11.v20130520.jar
Only in /Users/jbin/Downloads/datomic-console-0.1.216/lib/console: jetty-webapp-9.3.7.v20160115.jar
Only in /Users/jbin/Downloads/datomic-console-0.1.214/lib/console: jetty-xml-8.1.11.v20130520.jar
Only in /Users/jbin/Downloads/datomic-console-0.1.216/lib/console: jetty-xml-9.3.7.v20160115.jar
grep -oE ":GarbageSegments .*?}" datomicmetrics48hrsorted.json
@Jaretbinford
Jaretbinford / limit.clj
Created November 10, 2017 14:12
testing limit nil
(ns releasetest.limit)
(require '[datomic.api :as d])
(d/get-database-names "datomic:dev://localhost:4334/*")
(def uri "datomic:dev://localhost:4334/mbrainz-1968-1973")
(def conn (d/connect uri))
(def db (d/db conn))
@Jaretbinford
Jaretbinford / Jetty Dep test
Created December 7, 2017 01:20
[com.datomic/clj-client "0.8.606"] [org.clojure/core.async "0.3.465"] & [ring 1.6.0] or [ring 1.6.3] result in error
;project.clj
;(defproject depstest "0.1.0-SNAPSHOT"
; :description "FIXME: write description"
; :url "http://example.com/FIXME"
; :license {:name "Eclipse Public License"
; :url "http://www.eclipse.org/legal/epl-v10.html"}
; :dependencies [[org.clojure/clojure "1.9.0-alpha19"]
; [ring "1.6.3"]
; [com.datomic/clj-client "0.8.606"]
(require '[clojure.java.io :as io]
'[clojure.edn :as edn]
'[clojure.string :as str])
(defn metaspace-burner
[timings-file]
(future
(with-open [f (io/writer (io/file timings-file))]
(binding [*out* f ]
(loop []
{ $.Msg = "ResourceUtilization" }
(ns cloud-tester.core)
(require '[datomic.client.api :as d])
(def cfg {:server-type :cloud
:region "us-east-1" ;; e.g. us-east-1
:system "jaret-lambda-test"
:query-group "jaret-lambda-test"
:endpoint "http://entry.jaret-lambda-test.us-east-1.datomic.net:8182/"
:proxy-port 8182})
Retracting unique
(d/transact conn {:tx-data [[:db/retract :abstractRelease/gid :db/unique :db.unique/identity]]})
=>
{:db-before {:database-id "ba146c1e-3d87-49d9-8c6c-f2a2512fdf51",
:db-name "mbrainz-subset",
:t 33,
:next-t 34,
:type :datomic.client/db},
:db-after {:database-id "ba146c1e-3d87-49d9-8c6c-f2a2512fdf51",
~Testing upgrading httpclient 4.5.3 and artemis-core-client 2.6.2~
Methodology: Download 5703 datomic pro. Remove httpclient and artemis-core-client jars from lib directory. Replace with updated jars 4.5.3 and 2.6.2 respectively. Update pom.xml to reflect new versions. Launch bin/repl or bin/transactor and test
;;Connecting updated peer to non-updated transactor:
jbin at Jarets-MacBook-Pro in ~/Desktop/Jaret/Tools/releasetest/depstestpeer/on-prem-state-farm/datomic-pro-0.9.5703
$ bin/repl