Skip to content

Commit

Permalink
Merge pull request #142 from winebarrel/use_JSON_Lines
Browse files Browse the repository at this point in the history
Use "JSON Lines" instead of "NDJSON"
  • Loading branch information
winebarrel authored Nov 2, 2024
2 parents 5d870d3 + acbe2d8 commit 44425a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [1.3.2] - 2024-11-02

### Changed

* Use "JSON Lines" instead of "NDJSON".

## [1.3.1] - 2024-11-02

### Changed
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Flags:
-h, --help Show help.
--[no-]force Do not abort test on error. (default: disabled)
-f, --data-files=DATA-FILES,...
NDJSON file list of queries to execute.
JSON Lines file list of queries to execute.
--key="q" Key name of the query field in the test data. e.g.
{"q":"SELECT ..."}
--[no-]loop Return to the beginning after reading the test data.
Expand Down Expand Up @@ -158,8 +158,7 @@ docker compose up -d
make testacc
```

## Tools to convert logs to NDJSON

## Tools to convert logs to JSON Lines
* MySQL
* https://github.com/winebarrel/genlog
* PostgreSQL
Expand Down
2 changes: 1 addition & 1 deletion data.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (
)

type DataOptions struct {
DataFiles []string `kong:"short='f',required,help='NDJSON file list of queries to execute.'"`
DataFiles []string `kong:"short='f',required,help='JSON Lines file list of queries to execute.'"`
Key string `kong:"default='q',help='Key name of the query field in the test data. e.g. {\"q\":\"SELECT ...\"}'"`
Loop bool `kong:"negatable,default='true',help='Return to the beginning after reading the test data. (default: enabled)'"`
Random bool `kong:"negatable,default='false',help='Randomize the starting position of the test data. (default: disabled)'"`
Expand Down

0 comments on commit 44425a7

Please sign in to comment.