feat(v0.1.58): ImageExists cache hit, timing analysis, in-cluster registry plan

This commit is contained in:
Naeel
2026-03-23 06:22:25 +03:00
parent 7023e0e6fc
commit 9edd43edc5
20 changed files with 596 additions and 515 deletions
+1 -49
View File
@@ -1,55 +1,7 @@
// 2026-03-21 — stress.tf: все стресс-сервисы для комплексного тестирования.
// Три рантайма: go1.23 (3), nodejs20 (2), python3.11 (5).
// Два рантайма: nodejs20 (2), python3.11 (5).
// Все depends_on = [sless_job.postgres_table_init_job] — таблица должна существовать.
# ── Go 1.23 ─────────────────────────────────────────────────────────────────
# Быстрая математика: факториал + числа Фибоначчи. Без PG. Проверяет Go runtime.
resource "sless_service" "stress_go_fast" {
name = "stress-go-fast"
runtime = "go1.23"
entrypoint = "handler.Handle"
memory_mb = 128
timeout_sec = 15
source_dir = "${path.module}/code/stress-go-fast"
depends_on = [sless_job.postgres_table_init_job]
}
# Намеренный nil pointer dereference. Без PG. Проверяет recover() в Go runtime.
resource "sless_service" "stress_go_nil" {
name = "stress-go-nil"
runtime = "go1.23"
entrypoint = "handler.Handle"
memory_mb = 128
timeout_sec = 10
source_dir = "${path.module}/code/stress-go-nil"
depends_on = [sless_job.postgres_table_init_job]
}
# Конкурентный PG-шторм через pgxpool: N горутин INSERT/COUNT/MAX.
# timeout_sec=660 — покрывает max duration_sec=600 с запасом.
# pgx/v5 уже в базовом образе go1.23: user go.mod не нужен.
resource "sless_service" "stress_go_pgstorm" {
name = "stress-go-pgstorm"
runtime = "go1.23"
entrypoint = "handler.Handle"
memory_mb = 256
timeout_sec = 660
source_dir = "${path.module}/code/stress-go-pgstorm"
env_vars = {
PGHOST = local.pg_host
PGPORT = "5432"
PGDATABASE = local.pg_database
PGUSER = local.pg_username
PGPASSWORD = local.pg_password
PGSSLMODE = "require"
}
depends_on = [sless_job.postgres_table_init_job]
}
# ── Node.js 20 ────────────────────────────────────────────────────────────────