Skip to content

Commit

Permalink
middleware: disable logs 344721
Browse files Browse the repository at this point in the history
  • Loading branch information
mickamy committed Jan 10, 2024
1 parent bafae42 commit 21166a4
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 24 deletions.
8 changes: 4 additions & 4 deletions admin/config/my.app.cnf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[mysqld]
bind-address = 0.0.0.0

slow_query_log=1
long_query_time=1
log_queries_not_using_indexes=1
slow_query_log_file=/var/log/mysql/slow_query.log
slow_query_log=0
#long_query_time=1
#log_queries_not_using_indexes=1
#slow_query_log_file=/var/log/mysql/slow_query.log

innodb_buffer_pool_size = 2G
innodb_log_file_size = 512M
Expand Down
40 changes: 20 additions & 20 deletions admin/config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ http {
default_type application/octet-stream;


access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# access_log /var/log/nginx/access.log;
# error_log /var/log/nginx/error.log;

# access_log off;
# error_log /dev/null;
access_log off;
error_log /dev/null;

# alp 用のログフォーマット
log_format ltsv "time:$time_local"
"\thost:$remote_addr"
"\tforwardedfor:$http_x_forwarded_for"
"\treq:$request"
"\tstatus:$status"
"\tmethod:$request_method"
"\turi:$request_uri"
"\tsize:$body_bytes_sent"
"\treferer:$http_referer"
"\tua:$http_user_agent"
"\treqtime:$request_time"
"\tcache:$upstream_http_x_cache"
"\truntime:$upstream_http_x_runtime"
"\tapptime:$upstream_response_time"
"\tvhost:$host";
access_log /var/log/nginx/access.log ltsv;
# log_format ltsv "time:$time_local"
# "\thost:$remote_addr"
# "\tforwardedfor:$http_x_forwarded_for"
# "\treq:$request"
# "\tstatus:$status"
# "\tmethod:$request_method"
# "\turi:$request_uri"
# "\tsize:$body_bytes_sent"
# "\treferer:$http_referer"
# "\tua:$http_user_agent"
# "\treqtime:$request_time"
# "\tcache:$upstream_http_x_cache"
# "\truntime:$upstream_http_x_runtime"
# "\tapptime:$upstream_response_time"
# "\tvhost:$host";
# access_log /var/log/nginx/access.log ltsv;

proxy_cache_path /var/nginx/cache levels=1:2 keys_zone=CACHE:10m max_size=1g
inactive=1m use_temp_path=off;
Expand Down
14 changes: 14 additions & 0 deletions note.go.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,17 @@ docker exec -i ishocon2-bench-1 sh -c "./benchmark --ip app:443 --workload 7"
2024/01/10 09:20:11 投票者の感心がなくなりました
2024/01/10 09:20:11 {"score": 381180, "success": 256388, "failure": 0}
```

middleware: disable logs 344721

```
❯ make bench
docker exec -i ishocon2-bench-1 sh -c "./benchmark --ip app:443 --workload 7"
2024/01/10 10:59:18 期日前投票を開始します
2024/01/10 10:59:19 期日前投票が終了しました
2024/01/10 10:59:19 投票を開始します Workload: 7
2024/01/10 11:04:35 投票が終了しました
2024/01/10 11:04:35 投票者が結果を確認しています
2024/01/10 11:04:50 投票者の感心がなくなりました
2024/01/10 11:04:50 {"score": 344721, "success": 233409, "failure": 0}
```

0 comments on commit 21166a4

Please sign in to comment.