Commit efebf5c8 authored by Ivar Refsdal's avatar Ivar Refsdal

Clean up and add pr-str

parent 2472d96d
Pipeline #1786 skipped
(defproject repository-handler "0.0.1-SNAPSHOT"
:description "Repository handler with micro-service template"
(defproject pprinttest "0.0.1-SNAPSHOT"
:repositories {"Nesstar" {:url "http://nesstar-dev.nsd.uib.no/nexus/content/groups/public/"}}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/core.async "0.2.374"]
[ring/ring-devel "1.4.0"]
[environ "1.0.2"]
[clj-time "0.11.0"] ;; needed as `lein ring uberwar` is broken.
[metosin/compojure-api "1.0.1"]
[midje "1.8.3"]
[com.nesstar/nesstar-api "0.7"]
[org.hamcrest/hamcrest-all "1.1"]
[org.clojure/core.cache "0.6.5"]
[digest "1.4.4"]
[junit/junit "4.9"]
[fipp "0.6.5"]
[com.taoensso/timbre "4.4.0"]
;; log
[net.logstash.logback/logstash-logback-encoder "4.6"]
[ch.qos.logback/logback-core "1.1.7"]
[ch.qos.logback/logback-classic "1.1.7"]
[org.slf4j/slf4j-api "1.7.20"]
[com.fasterxml.jackson.core/jackson-core "2.7.0"]
[com.fasterxml.jackson.core/jackson-databind "2.7.0"]
[com.fasterxml.jackson.core/jackson-annotations "2.7.0"]]
[com.taoensso/timbre "4.4.0"]]
:main pprinttest.demo
:plugins [[lein-ring "0.9.7"]
[lein-shell "0.4.0"]
......@@ -32,18 +14,4 @@
[lein-midje "3.2"]]
:source-paths ["src"]
:test-paths ["test"]
:ring {:handler repository-handler.main/app}
:uberjar-name "repository-handler.jar"
:uberwar-name "repository-handler.war"
:profiles {:uberjar {:resource-paths ["swagger-ui"]
:aot :all}
:dev {:dependencies [[javax.servlet/servlet-api "2.5"]]}}
; uncomment if you want to remote debug
; jvm-opts ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=localhost:5005" "-Dclojure.compiler.disable-locals-clearing=true"]
:aliases {"test" ["with-profile" "test" "test"]})
:test-paths ["test"])
(ns pprinttest.demo
(:require [clojure.core.cache :as cache]
[clojure.java.io :as io]
(:require [clojure.java.io :as io]
[clojure.pprint :as clojure.pprint]
[fipp.clojure :as fipp]
[clojure.string :as string])
(:import (java.io File)))
[fipp.clojure :as fipp]))
(println "reading input ... ")
......@@ -12,6 +9,15 @@
(def original-input (time (read-string (slurp input-file))))
(println "start pr-str ...")
(time
(let [fout (io/writer "pr-str.out.bin")]
(binding [*out* fout]
(try
(pr-str original-input)
(finally
(.close fout))))))
(println "start clojure pprint ...")
(time
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment