File tree Expand file tree Collapse file tree 2 files changed +60
-3
lines changed
hibernate/src/main/kotlin/tech/ydb/slo/hibernate Expand file tree Collapse file tree 2 files changed +60
-3
lines changed Original file line number Diff line number Diff line change @@ -46,3 +46,62 @@ services:
46
46
- " 3000:3000"
47
47
networks :
48
48
- monitor-net
49
+ ydb :
50
+ image : cr.yandex/yc/yandex-docker-local-ydb:latest
51
+ container_name : ydb
52
+ environment :
53
+ - GRPC_TLS_PORT=2135
54
+ - GRPC_PORT=2136
55
+ - MON_PORT=8765
56
+ - YDB_USE_IN_MEMORY_PDISKS=true
57
+ - YDB_DEFAULT_LOG_LEVEL=NOTICE
58
+ ports :
59
+ - " 2135:2135"
60
+ - " 2136:2136"
61
+ - " 8765:8765"
62
+ volumes :
63
+ - ../data/ydb_certs:/ydb_certs
64
+ networks :
65
+ - monitor-net
66
+
67
+ slo-create :
68
+ build :
69
+ dockerfile : ./Dockerfile
70
+ args :
71
+ - SRC_PATH=hibernate
72
+ command :
73
+ - ' create'
74
+ - ' http://ydb:2136'
75
+ - ' /local'
76
+ - ' --table-name'
77
+ - ' slo-dotnet'
78
+ - ' --min-partitions-count'
79
+ - ' 6'
80
+ - ' --max-partitions-count'
81
+ - ' 1000'
82
+ - ' --partition-size'
83
+ - ' 1'
84
+ - ' --initial-data-count'
85
+ - ' 1000'
86
+ networks :
87
+ - monitor-net
88
+ depends_on :
89
+ ydb :
90
+ condition : service_healthy
91
+
92
+ slo-run :
93
+ build :
94
+ dockerfile : ./Dockerfile
95
+ command :
96
+ - ' run'
97
+ - ' http://ydb:2136'
98
+ - ' /local'
99
+ - ' --prom-pgw'
100
+ - ' http://prometheus-pushgateway:9091'
101
+ - ' --table-name'
102
+ - ' slo-dotnet'
103
+ networks :
104
+ - monitor-net
105
+ depends_on :
106
+ slo-create :
107
+ condition : service_completed_successfully
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class HibernateApplication : CommandLineRunner {
20
20
21
21
override fun run (vararg args : String ) {
22
22
val pushGateway = PushGateway .builder()
23
- .job(" hibernate- slo" )
23
+ .job(" slo" )
24
24
.address(" prometheus-pushgateway:9091" )
25
25
.build()
26
26
@@ -45,7 +45,6 @@ class HibernateApplication : CommandLineRunner {
45
45
okCount.labelValues(" read" , " TODO" , " hibernate" ).inc()
46
46
} catch (e: Exception ) {
47
47
notOkCount.labelValues(" read" , " TODO" , " hibernate" ).inc()
48
- println (e)
49
48
}
50
49
pushGateway.push()
51
50
}
@@ -56,7 +55,6 @@ class HibernateApplication : CommandLineRunner {
56
55
okCount.labelValues(" write" , " TODO" , " hibernate" ).inc()
57
56
} catch (e: Exception ) {
58
57
notOkCount.labelValues(" write" , " TODO" , " hibernate" ).inc()
59
- println (e)
60
58
}
61
59
pushGateway.push()
62
60
}
You can’t perform that action at this time.
0 commit comments