aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStaffan Olsson <staffan@repos.se>2017-07-29 11:21:25 +0200
committerStaffan Olsson <staffan@repos.se>2017-11-03 13:36:08 +0100
commita56322094b4c1a03b2df71d3f60110ed96085fb1 (patch)
tree5997f0c22543ca7966777a1eec58c870b75da122
parent02c4b3e7c898ffdf9008fa832c004d12c4eb9dee (diff)
downloadkubernetes-kafka-a56322094b4c1a03b2df71d3f60110ed96085fb1.tar.gz
kubernetes-kafka-a56322094b4c1a03b2df71d3f60110ed96085fb1.tar.bz2
kubernetes-kafka-a56322094b4c1a03b2df71d3f60110ed96085fb1.zip
zoo is fast now, <0.02s compared to >1s for the others
-rw-r--r--test/metrics.yml11
-rw-r--r--zookeeper/51zoo.yml4
2 files changed, 12 insertions, 3 deletions
diff --git a/test/metrics.yml b/test/metrics.yml
index 70a15ca..a95ae06 100644
--- a/test/metrics.yml
+++ b/test/metrics.yml
@@ -1,3 +1,5 @@
+# kubectl apply -f test/metrics.yml && kubectl scale --replicas=0 deploy/metrics && kubectl scale --replicas=1 deploy/metrics
+# kubectl exec -ti metrics-... -- tail -f /tmp/loglast | grep time_total
---
kind: ConfigMap
metadata:
@@ -16,11 +18,11 @@ data:
time_redirect %{time_redirect}\n
time_starttransfer %{time_starttransfer}\n
\n
- time_total %{time_total}\n
+ time_total{url="%{url_effective}"} %{time_total}\n
\n
http_code{url="%{url_effective}"} %{http_code}\n
+ size_download{url="%{url_effective}"} %{size_download}\n
content_type %{content_type}\n
- size_download %{size_download}\n
setup.sh: |-
touch /tmp/testlog
@@ -33,18 +35,23 @@ data:
exec >> /tmp/testlog
exec 2>&1
+ date -u -Iseconds | tee /tmp/loglast
+
curl -w "@/test/curl-format.txt" -s --max-time $MAX_RESPONSE_TIME \
http://kafka-0.broker.kafka.svc.cluster.local:5556/metrics \
+ | tee -a /tmp/loglast \
| grep http_code \
| grep 200
curl -w "@/test/curl-format.txt" -s --max-time $MAX_RESPONSE_TIME \
http://zoo-0.zoo.kafka.svc.cluster.local:5556/metrics \
+ | tee -a /tmp/loglast \
| grep http_code \
| grep 200
curl -w "@/test/curl-format.txt" -s --max-time $MAX_RESPONSE_TIME \
http://pzoo-1.pzoo.kafka.svc.cluster.local:5556/metrics \
+ | tee -a /tmp/loglast \
| grep http_code \
| grep 200
diff --git a/zookeeper/51zoo.yml b/zookeeper/51zoo.yml
index 1500801..c3e82ae 100644
--- a/zookeeper/51zoo.yml
+++ b/zookeeper/51zoo.yml
@@ -34,7 +34,9 @@ spec:
command:
- java
- -Xms39M
- - -Xmx99M
+ - -Xmx80M
+ - -XX:MaxPermSize=16m
+ - -Xss1m
- -jar
- jmx_prometheus_httpserver.jar
- "5556"