From 68044bb7948d0b2ac24b2f9d7f62aa4d5f8550d0 Mon Sep 17 00:00:00 2001 From: Tsukasa Arima Date: Thu, 8 Aug 2024 06:09:34 +0000 Subject: [PATCH] add timesecond --- .envrc.tpl | 2 ++ run_server.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.envrc.tpl b/.envrc.tpl index ba2fb74..7426aea 100644 --- a/.envrc.tpl +++ b/.envrc.tpl @@ -21,3 +21,5 @@ export OUTPUT_S3_URL="s3:///$(TZ=JST-9 date '+%Y%m%d')/${COMPRESSED export CHECK_HOSTNAME="localhost" export CHECK_PORT="5432" + +export MIN_DURATION="1" # milli seconds diff --git a/run_server.sh b/run_server.sh index 39b7b64..df2feac 100755 --- a/run_server.sh +++ b/run_server.sh @@ -51,7 +51,7 @@ function run_postgres { -c log_connections=on \ -c log_disconnections=on \ -c shared_preload_libraries='auto_explain' \ - -c auto_explain.log_min_duration=0 \ + -c auto_explain.log_min_duration="${MIN_DURATION:-0}" \ -c auto_explain.log_analyze=on \ -c auto_explain.log_buffers=on \ -c auto_explain.log_format=text \ @@ -86,7 +86,7 @@ function run_postgres { -c log_connections=on \ -c log_disconnections=on \ -c shared_preload_libraries='auto_explain' \ - -c auto_explain.log_min_duration=0 \ + -c auto_explain.log_min_duration="${MIN_DURATION:-0}" \ -c auto_explain.log_analyze=on \ -c auto_explain.log_buffers=on \ -c auto_explain.log_format=text \