Skip to content

Commit

Permalink
feat: SLO Hibernate
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillKurdyukov committed Aug 30, 2024
1 parent 0aec7ae commit dbcb6d7
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 3 deletions.
59 changes: 59 additions & 0 deletions slo/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,62 @@ services:
- "3000:3000"
networks:
- monitor-net
ydb:
image: cr.yandex/yc/yandex-docker-local-ydb:latest
container_name: ydb
environment:
- GRPC_TLS_PORT=2135
- GRPC_PORT=2136
- MON_PORT=8765
- YDB_USE_IN_MEMORY_PDISKS=true
- YDB_DEFAULT_LOG_LEVEL=NOTICE
ports:
- "2135:2135"
- "2136:2136"
- "8765:8765"
volumes:
- ../data/ydb_certs:/ydb_certs
networks:
- monitor-net

slo-create:
build:
dockerfile: ./Dockerfile
args:
- SRC_PATH=hibernate
command:
- 'create'
- 'http://ydb:2136'
- '/local'
- '--table-name'
- 'slo-dotnet'
- '--min-partitions-count'
- '6'
- '--max-partitions-count'
- '1000'
- '--partition-size'
- '1'
- '--initial-data-count'
- '1000'
networks:
- monitor-net
depends_on:
ydb:
condition: service_healthy

slo-run:
build:
dockerfile: ./Dockerfile
command:
- 'run'
- 'http://ydb:2136'
- '/local'
- '--prom-pgw'
- 'http://prometheus-pushgateway:9091'
- '--table-name'
- 'slo-dotnet'
networks:
- monitor-net
depends_on:
slo-create:
condition: service_completed_successfully
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class HibernateApplication : CommandLineRunner {

override fun run(vararg args: String) {
val pushGateway = PushGateway.builder()
.job("hibernate-slo")
.job("slo")
.address("prometheus-pushgateway:9091")
.build()

Expand All @@ -45,7 +45,6 @@ class HibernateApplication : CommandLineRunner {
okCount.labelValues("read", "TODO", "hibernate").inc()
} catch (e: Exception) {
notOkCount.labelValues("read", "TODO", "hibernate").inc()
println(e)
}
pushGateway.push()
}
Expand All @@ -56,7 +55,6 @@ class HibernateApplication : CommandLineRunner {
okCount.labelValues("write", "TODO", "hibernate").inc()
} catch (e: Exception) {
notOkCount.labelValues("write", "TODO", "hibernate").inc()
println(e)
}
pushGateway.push()
}
Expand Down

0 comments on commit dbcb6d7

Please sign in to comment.