From 8156f809e3df8ef9143632bce5267a623d4bfa3d Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Fri, 5 Dec 2025 07:20:56 -0700 Subject: [PATCH] chore: add shared vscode launch config (#20103) --- .gitignore | 1 + .vscode/launch.json | 76 +++++++++++++++++++++++++++++++++++++ pkg/logql/bench/config.yaml | 7 ++-- 3 files changed, 80 insertions(+), 4 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.gitignore b/.gitignore index 4badf19e70..e5cd7110d9 100644 --- a/.gitignore +++ b/.gitignore @@ -53,6 +53,7 @@ _shared-workflows-dockerhub-login # vscode .vscode +!.vscode/launch.json # nix nix/result diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000..9c25fdb799 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,76 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug Specified Test", + "type": "go", + "request": "launch", + "mode": "test", + "program": "${fileDirname}", + "args": [ + "-test.run", + "^${input:testName}$" + ], + "showLog": true, + "trace": "verbose" + }, + { + "name": "Attach to Process", + "type": "go", + "request": "attach", + "mode": "local", + "processId": "${command:pickProcess}" + }, + { + "name": "Debug Loki", + "type": "go", + "request": "launch", + "mode": "debug", + "program": "${workspaceFolder}/cmd/loki", + "args": [ + "-config.file=${workspaceFolder}/cmd/loki/loki-local-config.yaml" + ], + "showLog": true + }, + { + "name": "Debug Loki (Custom Config)", + "type": "go", + "request": "launch", + "mode": "debug", + "program": "${workspaceFolder}/cmd/loki", + "args": [ + "-config.file=${input:configFile}" + ], + "showLog": true + }, + { + "name": "Debug Remote Process (dlv connect)", + "type": "go", + "request": "attach", + "mode": "remote", + "remotePath": "${workspaceFolder}", + "port": "${input:port}", + "host": "localhost" + } + ], + "inputs": [ + { + "id": "configFile", + "type": "promptString", + "description": "Path to Loki config file", + "default": "${workspaceFolder}/cmd/loki/loki-local-config.yaml" + }, + { + "id": "testName", + "type": "promptString", + "description": "Test name to run" + }, + { + "id": "port", + "type": "promptString", + "description": "Port to connect to", + "default": 18001 + } + ] +} + diff --git a/pkg/logql/bench/config.yaml b/pkg/logql/bench/config.yaml index 816cebe60e..9aca1db435 100644 --- a/pkg/logql/bench/config.yaml +++ b/pkg/logql/bench/config.yaml @@ -78,10 +78,9 @@ storage_config: filesystem: dir: ${PWD}/pkg/logql/bench/data/storage -querier: - engine_v2: - enable: true - batch_size: 8192 +query_engine: + enable: true + batch_size: 8192 query_range: cache_results: false