Skip to content

Commit 9746515

Browse files
PFpengfengpengfeng
and
pengfeng
authored
add qlog-parser tool and update relative document (#437)
Co-authored-by: pengfeng <[email protected]>
1 parent c859573 commit 9746515

File tree

4 files changed

+1054
-1
lines changed

4 files changed

+1054
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ XQUIC Library released by Alibaba is …
3333
[![](https://img.shields.io/static/v1?label=draft-13&message=QUIC-LB&color=9cf)](https://tools.ietf.org/html/draft-ietf-quic-load-balancers-13)
3434
[![](https://img.shields.io/static/v1?label=draft-05&message=Multipath-QUIC&color=9cf)](https://tools.ietf.org/html/draft-ietf-quic-multipath-05)
3535
[![](https://img.shields.io/static/v1?label=draft-06&message=Multipath-QUIC&color=9cf)](https://tools.ietf.org/html/draft-ietf-quic-multipath-06)
36+
[![](https://img.shields.io/static/v1?label=draft-07&message=QUIC-Qlog&color=9cf)](https://datatracker.ietf.org/doc/html/draft-ietf-quic-qlog-main-schema-07)
3637

3738
#### Standardized Features
3839

@@ -156,7 +157,7 @@ sh ../scripts/xquic_test.sh
156157
- [draft-ietf-quic-qpack-21-zh](./docs/translation/draft-ietf-quic-qpack-21-zh.md)
157158
- [RFC9221-datagram-zh](./docs/translation/rfc9221-datagram-zh.md)
158159

159-
* For using event_log module, see the [Event_log module docs](./docs/docs-zh/Event_log-zh.md)
160+
* For using quic-qlog, see the [Features: qlog](./docs/Features.md)
160161
* For testing the library, see the [Testing docs](./docs/docs-zh/Testing-zh.md).
161162
* For other frequently asked questions, see the [FAQs](./docs/docs-zh/FAQ-zh.md) and [Trouble Shooting Guide](./docs/docs-zh/Troubleshooting-zh.md).
162163

docs/Features.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Features
2+
## qlog
3+
Based on qlog ([draft-ietf-quic-qlog-main-schema](https://datatracker.ietf.org/doc/draft-ietf-quic-qlog-main-schema/), [draft-ietf-quic-qlog-quic-events](https://datatracker.ietf.org/doc/draft-ietf-quic-qlog-quic-events/) and [draft-ietf-quic-qlog-h3-events](https://datatracker.ietf.org/doc/draft-ietf-quic-qlog-h3-events/)),xquic implements quic event logging.
4+
5+
### Activate qlog by DXQC_ENABLE_EVENT_LOG
6+
```shell
7+
cd build
8+
rm -rf *
9+
# add "-DXQC_ENABLE_EVENT_LOG=1"
10+
cmake -DGCOV=on -DCMAKE_BUILD_TYPE=Debug -DXQC_ENABLE_TESTING=1 -DXQC_SUPPORT_SENDMMSG_BUILD=1 -DXQC_ENABLE_EVENT_LOG=1 -DXQC_ENABLE_BBR2=1 -DXQC_ENABLE_RENO=1 -DSSL_TYPE=${SSL_TYPE_STR} -DSSL_PATH=${SSL_PATH_STR} ..
11+
12+
make -j
13+
```
14+
### Example
15+
Qlog defines three event importance levels, in decreasing order of importance and expected usage: core, base, extra. The level can be set by "--qlog_importance" argument:
16+
```shell
17+
./tests/test_server -l e -e --qlog_importance extra
18+
19+
./tests/test_client -s 10240 -l e -t 1 -E --qlog_importance extra
20+
```
21+
22+
To disable qlog, using "--qlog_disable":
23+
```shell
24+
./tests/test_server -l e -e --qlog_disable
25+
26+
./tests/test_client -s 10240 -l e -t 1 -E --qlog_disable
27+
```
28+
29+
### JSON format serialization
30+
```shell
31+
python ../scripts/qlog_parser.py --clog clog --slog slog --qlog_path demo_qlog.json
32+
```
33+
34+

docs/docs-zh/Features-zh.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Features
2+
## qlog
3+
基于 qlog ([draft-ietf-quic-qlog-main-schema](https://datatracker.ietf.org/doc/draft-ietf-quic-qlog-main-schema/)[draft-ietf-quic-qlog-quic-events](https://datatracker.ietf.org/doc/draft-ietf-quic-qlog-quic-events/)[draft-ietf-quic-qlog-h3-events](https://datatracker.ietf.org/doc/draft-ietf-quic-qlog-h3-events/)),xquic 实现了 quic 事件记录。
4+
### 编译参数 DXQC_ENABLE_EVENT_LOG 开启 qlog
5+
```shell
6+
cd build
7+
rm -rf *
8+
# 添加 "-DXQC_ENABLE_EVENT_LOG=1" 参数
9+
cmake -DGCOV=on -DCMAKE_BUILD_TYPE=Debug -DXQC_ENABLE_TESTING=1 -DXQC_SUPPORT_SENDMMSG_BUILD=1 -DXQC_ENABLE_EVENT_LOG=1 -DXQC_ENABLE_BBR2=1 -DXQC_ENABLE_RENO=1 -DSSL_TYPE=${SSL_TYPE_STR} -DSSL_PATH=${SSL_PATH_STR} ..
10+
11+
make -j
12+
```
13+
### 运行测试
14+
按重要性,qlog 将事件分为 core、base、extra 三个 importance level,可以通过 --qlog_importance 设置:
15+
```shell
16+
./tests/test_server -l e -e --qlog_importance extra
17+
18+
./tests/test_client -s 10240 -l e -t 1 -E --qlog_importance extra
19+
```
20+
21+
通过 --qlog_disable 关闭 qlog:
22+
```shell
23+
./tests/test_server -l e -e --qlog_disable
24+
25+
./tests/test_client -s 10240 -l e -t 1 -E --qlog_disable
26+
```
27+
28+
### JSON 格式转换
29+
执行 qlog_parser.py 脚本工具,将 xquic log 转换 json 格式 qlog.
30+
```shell
31+
python ../scripts/qlog_parser.py --clog clog --slog slog --qlog_path demo_qlog.json
32+
```
33+
34+

0 commit comments

Comments
 (0)