Skip to content

Commit 91d92bb

Browse files
committed
zoo is fast now, <0.02s compared to >1s for the others
1 parent deedd75 commit 91d92bb

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

test/metrics.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# kubectl apply -f test/metrics.yml && kubectl scale --replicas=0 deploy/metrics && kubectl scale --replicas=1 deploy/metrics
2+
# kubectl exec -ti metrics-... -- tail -f /tmp/loglast | grep time_total
13
---
24
kind: ConfigMap
35
metadata:
@@ -16,11 +18,11 @@ data:
1618
time_redirect %{time_redirect}\n
1719
time_starttransfer %{time_starttransfer}\n
1820
\n
19-
time_total %{time_total}\n
21+
time_total{url="%{url_effective}"} %{time_total}\n
2022
\n
2123
http_code{url="%{url_effective}"} %{http_code}\n
24+
size_download{url="%{url_effective}"} %{size_download}\n
2225
content_type %{content_type}\n
23-
size_download %{size_download}\n
2426
2527
setup.sh: |-
2628
touch /tmp/testlog
@@ -33,18 +35,23 @@ data:
3335
exec >> /tmp/testlog
3436
exec 2>&1
3537
38+
date -u -Iseconds | tee /tmp/loglast
39+
3640
curl -w "@/test/curl-format.txt" -s --max-time $MAX_RESPONSE_TIME \
3741
http://kafka-0.broker.kafka.svc.cluster.local:5556/metrics \
42+
| tee -a /tmp/loglast \
3843
| grep http_code \
3944
| grep 200
4045
4146
curl -w "@/test/curl-format.txt" -s --max-time $MAX_RESPONSE_TIME \
4247
http://zoo-0.zoo.kafka.svc.cluster.local:5556/metrics \
48+
| tee -a /tmp/loglast \
4349
| grep http_code \
4450
| grep 200
4551
4652
curl -w "@/test/curl-format.txt" -s --max-time $MAX_RESPONSE_TIME \
4753
http://pzoo-1.pzoo.kafka.svc.cluster.local:5556/metrics \
54+
| tee -a /tmp/loglast \
4855
| grep http_code \
4956
| grep 200
5057

zookeeper/51zoo.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ spec:
3434
command:
3535
- java
3636
- -Xms39M
37-
- -Xmx99M
37+
- -Xmx80M
38+
- -XX:MaxPermSize=16m
39+
- -Xss1m
3840
- -jar
3941
- jmx_prometheus_httpserver.jar
4042
- "5556"

0 commit comments

Comments
 (0)