Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lwlee2608 committed Nov 17, 2023
1 parent bb5bb69 commit 786faf3
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ make
```
The Makefile will automatically download [xk6](https://github.com/grafana/xk6), which is required to compile this project.

## Generator
`bin/dict_generator` is used to generate `diam/const.js`, which contains a list of AVP codes and vendor IDs.

```bash
./bin/dict_generator -output example/diam/const.js
```

## Example

```js
Expand Down Expand Up @@ -55,3 +48,17 @@ Use your custom k6 binary to run an example k6 script.
```bash
./bin/k6 run example/example.js
```

## Generator

There are thousands of AVPs, each with a unique avp-code and vendor-id. To aid readability and enhance the developer experience, we recommend defining them as constants in a separate file, for example, using `diam/const.js`.

You can either create the constant yourself or use the bin/dict_generator CLI tool to generate a full list of AVPs for you. Use the following command:
```bash
./bin/dict_generator -output example/diam/const.js
```

The CLI also supports generating additional AVPs that are not defined in the default list. Simply add the -dictionary flag to include the additional AVP definition:
```bash
./bin/dict_generator -output example/diam/const.js -dictionary dict/extra.xml
```

0 comments on commit 786faf3

Please sign in to comment.