-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
814ff40
commit ec8e623
Showing
28 changed files
with
209 additions
and
97 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
(ns build | ||
(:require [clojure.tools.build.api :as b])) | ||
|
||
(def lib 'samply/blaze) | ||
(def version "0.18.4") | ||
(def class-dir "target/classes") | ||
(def basis (b/create-basis {:project "deps.edn"})) | ||
(def uber-file (format "target/%s-%s-standalone.jar" (name lib) version)) | ||
|
||
(defn clean [_] | ||
(b/delete {:path "target"})) | ||
|
||
(defn uber [_] | ||
(clean nil) | ||
(b/copy-dir {:src-dirs ["src" "resources"] | ||
:target-dir class-dir}) | ||
(b/compile-clj {:basis basis | ||
:src-dirs ["src"] | ||
:class-dir class-dir | ||
:compile-opts | ||
{:direct-linking true | ||
:elide-meta [:doc :file :line :added]}}) | ||
(b/uber {:class-dir class-dir | ||
:uber-file uber-file | ||
:basis basis | ||
:main 'blaze.core | ||
:exclude | ||
["^about.html" | ||
"^META-INF/versions/\\d+/module-info.class" | ||
"^HISTORY-JAVA.md" | ||
"^dse_protocol_v\\d.spec" | ||
"^native_protocol_v\\d.spec" | ||
".*-musl.so$" | ||
".*-ppc64le.so$" | ||
".*-s390x.so$" | ||
".*-linux32.so$" | ||
".*.dll$" | ||
".*.jnilib$"] | ||
:conflict-handlers | ||
{"META-INF/io.netty.versions.properties" :append | ||
:default :warn}})) |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{:paths ["src" "resources"] | ||
{:paths ["src"] | ||
|
||
:deps | ||
{com.google.guava/guava | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
lint: | ||
clj-kondo --lint src test deps.edn | ||
|
||
test: | ||
prep: | ||
clojure -X:deps prep | ||
|
||
test: prep | ||
clojure -M:test:kaocha --profile :ci | ||
|
||
test-coverage: | ||
test-coverage: prep | ||
clojure -M:test:coverage | ||
|
||
clean: | ||
rm -rf .clj-kondo/.cache .cpcache target | ||
|
||
.PHONY: lint test test-coverage clean | ||
.PHONY: lint prep test test-coverage clean |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
lint: | ||
clj-kondo --lint src test deps.edn | ||
|
||
test: | ||
prep: | ||
clojure -X:deps prep | ||
|
||
test: prep | ||
clojure -M:test:kaocha --profile :ci | ||
|
||
test-coverage: | ||
test-coverage: prep | ||
clojure -M:test:coverage | ||
|
||
clean: | ||
rm -rf .clj-kondo/.cache .cpcache target | ||
|
||
.PHONY: lint test test-coverage clean | ||
.PHONY: lint prep test test-coverage clean |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
lint: | ||
clj-kondo --lint src test deps.edn | ||
|
||
test: | ||
prep: | ||
clojure -X:deps prep | ||
|
||
test: prep | ||
clojure -M:test:kaocha --profile :ci | ||
|
||
test-coverage: | ||
test-coverage: prep | ||
clojure -M:test:coverage | ||
|
||
clean: | ||
rm -rf .clj-kondo/.cache .cpcache target | ||
|
||
.PHONY: lint test test-coverage clean | ||
.PHONY: lint prep test test-coverage clean |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
lint: | ||
clj-kondo --lint src test deps.edn | ||
|
||
test: | ||
prep: | ||
clojure -X:deps prep | ||
|
||
test: prep | ||
clojure -M:test:kaocha --profile :ci | ||
|
||
test-coverage: | ||
test-coverage: prep | ||
clojure -M:test:coverage | ||
|
||
clean: | ||
rm -rf .clj-kondo/.cache .cpcache target | ||
|
||
.PHONY: lint test test-coverage clean | ||
.PHONY: lint prep test test-coverage clean |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
lint: | ||
clj-kondo --lint src test test-perf deps.edn | ||
|
||
test: | ||
prep: | ||
clojure -X:deps prep | ||
|
||
test: prep | ||
clojure -M:test:kaocha --profile :ci | ||
|
||
test-coverage: | ||
test-coverage: prep | ||
clojure -M:test:coverage | ||
|
||
clean: | ||
rm -rf .clj-kondo/.cache .cpcache target | ||
|
||
.PHONY: lint test test-coverage clean | ||
.PHONY: lint prep test test-coverage clean |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
lint: | ||
clj-kondo --lint src test deps.edn | ||
|
||
test: | ||
prep: | ||
clojure -X:deps prep | ||
|
||
test: prep | ||
clojure -M:test:kaocha --profile :ci | ||
|
||
test-coverage: | ||
test-coverage: prep | ||
clojure -M:test:coverage | ||
|
||
clean: | ||
rm -rf .clj-kondo/.cache .cpcache target | ||
|
||
.PHONY: lint test test-coverage clean | ||
.PHONY: lint prep test test-coverage clean |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
lint: | ||
clj-kondo --lint src test deps.edn | ||
|
||
test: | ||
build: | ||
clojure -T:build compile | ||
|
||
test: build | ||
clojure -M:test:kaocha --profile :ci | ||
|
||
test-coverage: | ||
test-coverage: build | ||
clojure -M:test:coverage | ||
|
||
clean: | ||
rm -rf .clj-kondo/.cache .cpcache target | ||
|
||
.PHONY: lint test test-coverage clean | ||
.PHONY: lint build test test-coverage clean |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
(ns build | ||
(:refer-clojure :exclude [compile]) | ||
(:require [clojure.tools.build.api :as b])) | ||
|
||
|
||
(defn compile [_] | ||
(b/compile-clj | ||
{:basis (b/create-basis | ||
{:project "deps.edn" | ||
:compile-opts {:direct-linking true}}) | ||
:class-dir "target/classes" | ||
:ns-compile ['blaze.metrics.Collector]})) |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(ns blaze.metrics.Collector | ||
(:gen-class | ||
:extends io.prometheus.client.Collector | ||
:constructors {[Object] []} | ||
:init init | ||
:state fn | ||
:main false)) | ||
|
||
|
||
(set! *warn-on-reflection* true) | ||
|
||
|
||
(defn -init [fn] | ||
[[] fn]) | ||
|
||
|
||
(defn -collect-void [this] | ||
((.-fn ^blaze.metrics.Collector this))) |
Oops, something went wrong.