From a3ae7ab584f80c03d7590685f2a852a34f9fd2d3 Mon Sep 17 00:00:00 2001 From: mjsqu Date: Thu, 24 Aug 2023 10:44:08 +1200 Subject: [PATCH 1/2] Add viztracer command for testing targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When it comes to testing targets it took me a long while to work out I could use the `--input` switch to pass a file of records to the target rather than trying to work out how to run `viztracer` on a command containing a pipe 🤯. If the added line can be proven to work by a reviewer and it's OK to be added to the documentation then it would have saved me heaps of time yesterday 😄 --- docs/dev_guide.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/dev_guide.md b/docs/dev_guide.md index 5a118adf0..87d075e44 100644 --- a/docs/dev_guide.md +++ b/docs/dev_guide.md @@ -264,6 +264,7 @@ Then simply run your package's CLI as normal, preceded by the `viztracer` comman ```console $ poetry run viztracer my-tap +$ poetry run viztracer -- my-target --config=config.json --input=messages.json ``` That command will produce a `result.json` file which you can explore with the `vizviewer` tool. From a585c2fe8ebc7ce2516c133cc81c41cbea912d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgar=20Ram=C3=ADrez=20Mondrag=C3=B3n?= Date: Thu, 24 Aug 2023 08:30:12 -0600 Subject: [PATCH 2/2] Update poetry command --- docs/dev_guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/dev_guide.md b/docs/dev_guide.md index 87d075e44..316cca8ad 100644 --- a/docs/dev_guide.md +++ b/docs/dev_guide.md @@ -257,7 +257,7 @@ We've had success using [`viztracer`](https://github.com/gaogaotiantian/viztrace You can start doing the same in your package. Start by installing `viztracer`. ```console -$ poetry add --dev viztracer +$ poetry add --group dev viztracer ``` Then simply run your package's CLI as normal, preceded by the `viztracer` command