├── .editorconfig
├── .gitattributes
├── .gitignore
├── LICENSE
├── Makefile
├── README.md
├── RESULTS.md
├── RESULTS.slow.md
├── bin
└── .gitkeep
├── ch-bench-chconn
└── main.go
├── ch-bench-cpp
└── bench.cpp
├── ch-bench-faster-multiple
└── main.go
├── ch-bench-faster
└── main.go
├── ch-bench-java
├── Main.java
└── run.sh
├── ch-bench-mailru
└── main.go
├── ch-bench-official
└── main.go
├── ch-bench-python
├── main.py
└── requrements.txt
├── ch-bench-rust-driver
├── .gitignore
├── Cargo.lock
├── Cargo.toml
└── src
│ └── main.rs
├── ch-bench-rust-http
├── .gitignore
├── Cargo.lock
├── Cargo.toml
└── src
│ └── main.rs
├── ch-bench-rust
├── .gitignore
├── Cargo.lock
├── Cargo.toml
└── src
│ └── main.rs
├── ch-bench-uptrace
└── main.go
├── ch-write-bench-faster
└── main.go
├── ch-write-bench-official
└── main.go
├── curl
└── run.sh
├── go.mod
└── go.sum
/.editorconfig:
--------------------------------------------------------------------------------
1 | # http://editorconfig.org/
2 |
3 | root = true
4 |
5 | [*]
6 | charset = utf-8
7 | insert_final_newline = true
8 | trim_trailing_whitespace = true
9 | end_of_line = lf
10 |
11 | [{*.go, go.mod}]
12 | indent_style = tab
13 | indent_size = 4
14 |
15 | [{*.yml,*.yaml}]
16 | indent_style = space
17 | indent_size = 2
18 |
19 | [*.py]
20 | indent_style = space
21 | indent_size = 4
22 |
23 | # Makefiles always use tabs for indentation
24 | [Makefile]
25 | indent_style = tab
26 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.raw linguist-generated
2 | *.tpl linguist-language=Go
3 | *.raw binary
4 | *.hex text
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Binaries for programs and plugins
2 | *.class
3 | *.jar
4 | *.jfr
5 | *.exe
6 | *.exe~
7 | *.dll
8 | *.so
9 | *.dylib
10 |
11 | # Test binary, built with `go test -c`
12 | *.test
13 |
14 | # Output of the go coverage tool, specifically when used with LiteIDE
15 | *.out
16 |
17 | # Dependency directories (remove the comment below to include it)
18 | # vendor/
19 |
20 | .idea
21 | .vscode
22 |
23 | bin/ch-*
24 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | .PHONY: ch-bench-chconn
2 | .PHONY: ch-bench-uptrace
3 | .PHONY: ch-bench-faster
4 | .PHONY: ch-bench-rust
5 | .PHONY: ch-bench-rust-driver
6 | .PHONY: ch-bench-rust-http
7 | .PHONY: ch-bench-official
8 | .PHONY: ch-bench-mailru
9 | .PHONY: build
10 |
11 | ch-bench-chconn:
12 | go build -o bin ./ch-bench-chconn
13 |
14 | ch-bench-faster:
15 | go build -o bin ./ch-bench-faster
16 |
17 | ch-bench-uptrace:
18 | go build -o bin ./ch-bench-uptrace
19 |
20 | ch-bench-official:
21 | go build -o bin ./ch-bench-official
22 |
23 | ch-bench-mailru:
24 | go build -o bin ./ch-bench-mailru
25 |
26 | ch-bench-rust:
27 | cd ch-bench-rust && RUSTFLAGS="-C target-cpu=native" cargo build --profile release-adjusted
28 | rm -f ./bin/ch-bench-rust
29 | cp ./ch-bench-rust/target/release/ch-bench-rust ./bin/ch-bench-rust
30 |
31 | ch-bench-rust-driver:
32 | cd ch-bench-rust-driver && RUSTFLAGS="-C target-cpu=native" cargo build --profile release-adjusted
33 | rm -f ./bin/ch-bench-rust-driver
34 | cp ./ch-bench-rust-driver/target/release/ch-bench-rust-driver ./bin/ch-bench-rust-driver
35 |
36 | ch-bench-rust-http:
37 | cd ch-bench-rust-http && RUSTFLAGS="-C target-cpu=native" cargo build --profile release-adjusted
38 | rm -f ./bin/ch-bench-rust-http
39 | cp ./ch-bench-rust-http/target/release/ch-bench-rust-http ./bin/ch-bench-rust-http
40 |
41 | build: ch-bench-chconn ch-bench-official ch-bench-faster ch-bench-uptrace ch-bench-rust ch-bench-rust-http ch-bench-mailru ch-bench-official ch-bench-rust-driver
42 |
43 | run:
44 | hyperfine -w 10 -r 100 \
45 | ./bin/ch-bench-faster -n go-faster \
46 | ./bin/ch-bench-cpp -n clickhouse-cpp \
47 | ./bin/ch-bench-chconn -n vahid-sohrabloo/chconn \
48 | ./bin/ch-bench-rust-driver -n clickhouse_driver_rust \
49 | ./bin/ch-bench-official -n clickhouse-go \
50 | ./bin/ch-bench-uptrace -n uptrace \
51 | 'clickhouse-client -q "SELECT number FROM system.numbers_mt LIMIT 500000000" --format Null --time' -n clickhouse-client \
52 | --export-markdown RESULTS.md
53 | run-slow:
54 | hyperfine -r 5 \
55 | ./bin/ch-bench-faster -n go-faster \
56 | ./bin/ch-bench-cpp -n cpp \
57 | ./bin/ch-bench-rust -n rs \
58 | ./bin/ch-bench-rust-http -n rs-http \
59 | ./bin/ch-bench-chconn -n vahid-sohrabloo/chconn \
60 | 'clickhouse-client -q "SELECT number FROM system.numbers_mt LIMIT 500000000" --format Null --time' -n clickhouse-client \
61 | --export-markdown RESULTS.slow.md
62 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Benchmarks
2 |
3 | Totally **unscientific** and mostly unrealistic benchmark that
4 | [ClickHouse/ch-go][ch] project uses to understand performance.
5 |
6 | The main goal is to measure minimal **client overhead** (CPU, RAM) to read data,
7 | i.e. data blocks deserialization and transfer.
8 |
9 | Please see [Notes](#Notes) for more details about results.
10 |
11 | ```sql
12 | SELECT number FROM system.numbers_mt LIMIT 500000000
13 | ```
14 | ```
15 | 500000000 rows in set. Elapsed: 0.503 sec.
16 | Processed 500.07 million rows,
17 | 4.00 GB (993.26 million rows/s., 7.95 GB/s.)
18 | ```
19 |
20 | Note: due to row-oriented design of most libraries, overhead per single row
21 | is significantly higher, so results can be slightly surprising.
22 |
23 |
24 | | Name | Time | RAM | Ratio |
25 | |-----------------------------------------------|-------|------|-------|
26 | | **[ClickHouse/ch-go][ch]** (Go) | 401ms | 9M | ~1x |
27 | | [clickhouse-client][client] (C++) | 387ms | 91M | ~1x |
28 | | [vahid-sohrabloo/chconn][vahid] (Go) | 472ms | 9M | ~1x |
29 | | [clickhouse-cpp][cpp] (C++) | 516ms | 6.9M | 1.47x |
30 | | [clickhouse_driver][rs] (Rust) | 614ms | 9M | 1.72x |
31 | | [curl][curl] (C, HTTP) | 3.7s | 10M | 9x |
32 | | [clickhouse-client][java] (Java, HTTP) | 6.4s | 121M | 16x |
33 | | [clickhouse-jdbc][jdbc] (Java, HTTP) | 7.2s | 120M | 18x |
34 | | [loyd/clickhouse.rs][rs-http] (Rust, HTTP) | 10s | 7.2M | 28x |
35 | | [uptrace][uptrace] (Go)[^reflect] | 22s | 13M | 55x |
36 | | [clickhouse-driver][py] (Python) | 37s | 60M | 106x |
37 | | [ClickHouse/clickhouse-go][go] (Go)[^reflect] | 46.8s | 23M | 117x |
38 | | [mailru/go-clickhouse][mail] (Go, HTTP) | 4m13s | 13M | 729x |
39 |
40 | [^reflect]: Uses reflection on `row.Scan(&value)` which causes additional overhead.
41 |
42 | [client]: https://clickhouse.com/docs/en/interfaces/cli/ "Native command-line client (Official)"
43 | [ch]: https://github.com/ClickHouse/ch-go "ClickHouse/ch-go"
44 | [rs]: https://github.com/datafuse-extras/clickhouse_driver "datafuse-extras/clickhouse_driver"
45 | [rs-http]: https://github.com/loyd/clickhouse.rs "A typed client for ClickHouse (HTTP)"
46 | [cpp]: https://github.com/ClickHouse/clickhouse-cpp "C++ client library for ClickHouse (Official)"
47 | [curl]: https://github.com/curl/curl "A command-line tool for transferring data specified with URL syntax"
48 | [vahid]: https://github.com/vahid-sohrabloo/chconn "Low-level ClickHouse database driver for Golang"
49 | [java]: https://github.com/ClickHouse/clickhouse-jdbc/tree/develop/clickhouse-client "Java client for ClickHouse (Official)"
50 | [jdbc]: https://github.com/ClickHouse/clickhouse-jdbc/tree/develop/clickhouse-jdbc "JDBC driver for ClickHouse (Official)"
51 | [py]: https://github.com/mymarilyn/clickhouse-driver
52 | [go]: https://github.com/ClickHouse/clickhouse-go "Golang driver for ClickHouse (Official)"
53 | [mail]: https://github.com/mailru/go-clickhouse "Golang SQL database driver (HTTP, TSV format)"
54 | [uptrace]: https://github.com/uptrace/go-clickhouse "ClickHouse client for Go 1.18+ (Uptrace)"
55 |
56 | See [RESULTS.md](./RESULTS.md) and [RESULTS.slow.md](./RESULTS.slow.md).
57 |
58 |
59 | Keeping `ClickHouse/ch-go`, `clickhouse-client` and `vahid-sohrabloo/chconn` to `~1x`, they are mostly equal.
60 |
61 |
62 | ## Notes
63 |
64 | ### C++
65 |
66 | | Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
67 | |:--------------------|--------------:|---------:|---------:|------------:|
68 | | `ClickHouse/ch-go` | 598.8 ± 92.2 | 356.9 | 792.8 | 1.07 ± 0.33 |
69 | | `clickhouse-client` | 561.9 ± 149.5 | 387.8 | 1114.2 | 1.00 |
70 | | `clickhouse-cpp` | 574.4 ± 35.9 | 523.3 | 707.4 | 1.02 ± 0.28 |
71 |
72 |
73 | We are selecting **best** results, however C++ client has lower dispersion.
74 |
75 | # Maximum possible speed
76 |
77 | I've measured my localhost performance using `iperf3`, getting 10 GiB/s,
78 | this correlates with top results.
79 |
80 | For example, one of [ClickHouse/ch-go][ch] results is `390ms 500000000 rows 4.0 GB 10 GB/s`.
81 |
82 | I've also implemented [mock server in Go](https://github.com/ClickHouse/ch-go/blob/main/internal/cmd/ch-bench-server/main.go) that simulates ClickHouse server to reduce
83 | overhead, because currently the main bottleneck in this test is server itself (and probably localhost).
84 | The [ClickHouse/ch-go][ch] was able
85 | to achieve `257ms 500000000 rows 4.0 GB 16 GB/s` which should be maximum
86 | possible burst result, but I'm not 100% sure.
87 |
88 | On [ClickHouse/ch-go][ch] micro-benchmarks I'm getting up to 27 GB/s, not accounting of any
89 | network overhead (i.e. inmemory).
90 |
--------------------------------------------------------------------------------
/RESULTS.md:
--------------------------------------------------------------------------------
1 | | Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
2 | |:-------------------------|--------------:|---------:|---------:|-------------:|
3 | | `go-faster` | 650.6 ± 103.9 | 415.5 | 847.2 | 1.11 ± 0.33 |
4 | | `clickhouse-cpp` | 611.3 ± 47.1 | 523.5 | 718.3 | 1.05 ± 0.27 |
5 | | `vahid-sohrabloo/chconn` | 660.8 ± 68.3 | 473.0 | 790.0 | 1.13 ± 0.30 |
6 | | `clickhouse_driver_rust` | 829.7 ± 87.1 | 633.8 | 966.8 | 1.42 ± 0.38 |
7 | | `clickhouse-go` | 6529.0 ± 91.5 | 6189.6 | 6809.1 | 11.17 ± 2.77 |
8 | | `uptrace` | 4903.0 ± 33.0 | 4842.4 | 4995.0 | 8.39 ± 2.08 |
9 | | `clickhouse-client` | 584.7 ± 144.8 | 422.0 | 1156.0 | 1.00 |
10 |
--------------------------------------------------------------------------------
/RESULTS.slow.md:
--------------------------------------------------------------------------------
1 | | Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
2 | |:-------------------------|-----------------:|---------:|---------:|--------------:|
3 | | `go-faster` | 644.6 ± 53.8 | 586.8 | 719.4 | 1.27 ± 0.27 |
4 | | `clickhouse-cpp` | 579.5 ± 23.2 | 541.8 | 599.0 | 1.14 ± 0.22 |
5 | | `clickhouse-rs` | 27121.7 ± 1342.0 | 24759.9 | 28106.2 | 53.43 ± 10.57 |
6 | | `vahid-sohrabloo/chconn` | 5065.6 ± 114.6 | 4901.1 | 5204.0 | 9.98 ± 1.93 |
7 | | `clickhouse-go` | 38253.9 ± 98.1 | 38119.8 | 38366.5 | 75.37 ± 14.44 |
8 | | `clickhouse-client` | 507.6 ± 97.2 | 408.5 | 615.7 | 1.00 |
9 |
--------------------------------------------------------------------------------
/bin/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ClickHouse/ch-bench/1c9e8e92fb9684a40a5ff4ac36acce0d2662511f/bin/.gitkeep
--------------------------------------------------------------------------------
/ch-bench-chconn/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "context"
5 | "fmt"
6 | "os"
7 | "time"
8 |
9 | "github.com/go-faster/errors"
10 | "github.com/vahid-sohrabloo/chconn"
11 | "github.com/vahid-sohrabloo/chconn/column"
12 | )
13 |
14 | func run(ctx context.Context) error {
15 | c, err := chconn.Connect(ctx, "")
16 | if err != nil {
17 | return errors.Wrap(err, "connect")
18 | }
19 |
20 | s, err := c.Select(ctx, "SELECT number FROM system.numbers_mt LIMIT 500000000")
21 | if err != nil {
22 | return errors.Wrap(err, "select")
23 | }
24 |
25 | start := time.Now()
26 |
27 | var data []uint64
28 | colRead := column.NewUint64(false)
29 | for s.Next() {
30 | if err := s.NextColumn(colRead); err != nil {
31 | return errors.Wrap(err, "column")
32 | }
33 | data = data[:0] // <- value is read
34 | colRead.ReadAllUnsafe(&data)
35 | }
36 | if err := s.Err(); err != nil {
37 | return errors.Wrap(err, "next")
38 | }
39 |
40 | fmt.Println(time.Since(start).Round(time.Millisecond))
41 |
42 | return nil
43 | }
44 |
45 | func main() {
46 | if err := run(context.Background()); err != nil {
47 | fmt.Fprintf(os.Stderr, "Error: %+v\n", err)
48 | os.Exit(2)
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/ch-bench-cpp/bench.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | using namespace clickhouse;
5 |
6 | int main() {
7 | Client client(ClientOptions().SetHost("localhost"));
8 |
9 | uint64_t count = 0;
10 | client.Select("SELECT number FROM system.numbers_mt LIMIT 500000000", [&count](const Block &block)
11 | {
12 | count += block.GetRowCount();
13 | }
14 | );
15 |
16 | std::cout << count << "\n";
17 | }
18 |
--------------------------------------------------------------------------------
/ch-bench-faster-multiple/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "context"
5 | "flag"
6 | "fmt"
7 | "os"
8 | "sync/atomic"
9 | "time"
10 |
11 | "github.com/dustin/go-humanize"
12 | "github.com/go-faster/errors"
13 | "golang.org/x/sync/errgroup"
14 |
15 | "github.com/ClickHouse/ch-go"
16 | "github.com/ClickHouse/ch-go/proto"
17 | )
18 |
19 | func run(ctx context.Context) error {
20 | var arg struct {
21 | Workers int
22 | }
23 | flag.IntVar(&arg.Workers, "j", 1, "concurrent workers to use")
24 | flag.Parse()
25 |
26 | var (
27 | rows uint64
28 | totalBytes uint64
29 | )
30 |
31 | start := time.Now()
32 | g, ctx := errgroup.WithContext(ctx)
33 | for i := 0; i < arg.Workers; i++ {
34 | g.Go(func() error {
35 | c, err := ch.Dial(ctx, ch.Options{})
36 | if err != nil {
37 | return errors.Wrap(err, "dial")
38 | }
39 | defer func() {
40 | _ = c.Close()
41 | }()
42 |
43 | var data proto.ColUInt64
44 | if err := c.Do(ctx, ch.Query{
45 | Body: "SELECT number FROM system.numbers_mt LIMIT 500000000",
46 | OnProgress: func(ctx context.Context, p proto.Progress) error {
47 | atomic.AddUint64(&totalBytes, p.Bytes)
48 | return nil
49 | },
50 | OnResult: func(ctx context.Context, block proto.Block) error {
51 | atomic.AddUint64(&rows, uint64(block.Rows))
52 | return nil
53 | },
54 | Result: proto.Results{
55 | {Name: "number", Data: &data},
56 | },
57 | }); err != nil {
58 | return errors.Wrap(err, "query")
59 | }
60 |
61 | return nil
62 | })
63 | }
64 |
65 | if err := g.Wait(); err != nil {
66 | return errors.Wrap(err, "wait")
67 | }
68 |
69 | duration := time.Since(start)
70 | fmt.Println(duration.Round(time.Millisecond), rows, "rows",
71 | humanize.Bytes(totalBytes),
72 | humanize.Bytes(uint64(float64(totalBytes)/duration.Seconds()))+"/s",
73 | arg.Workers, "jobs",
74 | )
75 |
76 | return nil
77 | }
78 |
79 | func main() {
80 | if err := run(context.Background()); err != nil {
81 | fmt.Fprintf(os.Stderr, "Error: %+v\n", err)
82 | os.Exit(2)
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/ch-bench-faster/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "context"
5 | "fmt"
6 | "os"
7 | "time"
8 |
9 | "github.com/ClickHouse/ch-go"
10 | "github.com/ClickHouse/ch-go/proto"
11 | "github.com/dustin/go-humanize"
12 | "github.com/go-faster/errors"
13 | )
14 |
15 | func run(ctx context.Context) error {
16 | c, err := ch.Dial(ctx, ch.Options{})
17 | if err != nil {
18 | return errors.Wrap(err, "dial")
19 | }
20 | defer func() { _ = c.Close() }()
21 |
22 | var (
23 | gotRows uint64
24 | gotBytes uint64
25 | data proto.ColUInt64
26 | )
27 | start := time.Now()
28 | if err := c.Do(ctx, ch.Query{
29 | Body: "SELECT number FROM system.numbers_mt LIMIT 500000000",
30 | OnProgress: func(ctx context.Context, p proto.Progress) error {
31 | gotBytes += p.Bytes
32 | return nil
33 | },
34 | OnResult: func(ctx context.Context, block proto.Block) error {
35 | gotRows += uint64(data.Rows())
36 | _ = data // value is read into proto.ColUInt64, which is []uint64
37 | return nil
38 | },
39 | Result: proto.Results{
40 | {Name: "number", Data: &data},
41 | },
42 | }); err != nil {
43 | return errors.Wrap(err, "query")
44 | }
45 |
46 | duration := time.Since(start)
47 | fmt.Println(duration.Round(time.Millisecond), gotRows, "rows",
48 | humanize.Bytes(gotBytes),
49 | humanize.Bytes(uint64(float64(gotBytes)/duration.Seconds()))+"/s",
50 | )
51 |
52 | return nil
53 | }
54 |
55 | func main() {
56 | if err := run(context.Background()); err != nil {
57 | fmt.Fprintf(os.Stderr, "Error: %+v\n", err)
58 | os.Exit(2)
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/ch-bench-java/Main.java:
--------------------------------------------------------------------------------
1 | import java.io.EOFException;
2 | import java.sql.Connection;
3 | import java.sql.DriverManager;
4 | import java.sql.ResultSet;
5 | import java.sql.SQLException;
6 | import java.sql.Statement;
7 | import java.util.Properties;
8 | import java.util.concurrent.ExecutionException;
9 |
10 | import com.clickhouse.client.ClickHouseChecker;
11 | import com.clickhouse.client.ClickHouseClient;
12 | import com.clickhouse.client.ClickHouseFormat;
13 | import com.clickhouse.client.ClickHouseInputStream;
14 | import com.clickhouse.client.ClickHouseNode;
15 | import com.clickhouse.client.ClickHouseNodeSelector;
16 | import com.clickhouse.client.ClickHouseNodes;
17 | import com.clickhouse.client.ClickHouseProtocol;
18 | import com.clickhouse.client.ClickHouseRecord;
19 | import com.clickhouse.client.ClickHouseResponse;
20 | import com.clickhouse.client.config.ClickHouseClientOption;
21 | import com.clickhouse.jdbc.ClickHouseConnection;
22 | import com.clickhouse.jdbc.ClickHouseDriver;
23 |
24 | public class Main {
25 | static long useJavaClient(String url, String sql, String[] args) throws Exception {
26 | System.out.println("Using Java client");
27 | long count = 0L;
28 |
29 | String deser = args[0];
30 | ClickHouseNodes servers = ClickHouseNodes.of(url);
31 | ClickHouseNode server = servers.apply(ClickHouseNodeSelector.EMPTY);
32 | try (ClickHouseClient client = ClickHouseClient.newInstance(server.getProtocol());
33 | ClickHouseResponse response = client.connect(server).query(sql).executeAndWait();
34 | ClickHouseInputStream input = response.getInputStream()) {
35 | if ("byte".equalsIgnoreCase(deser)) {
36 | while (true) {
37 | try {
38 | input.readByte();
39 | } catch (EOFException e) {
40 | break;
41 | }
42 | count++;
43 | }
44 | } else if ("bytes".equalsIgnoreCase(deser)) {
45 | int batch = 1000;
46 | if (args.length > 1 && !ClickHouseChecker.isNullOrBlank(args[1])) {
47 | batch = Integer.parseInt(args[1]);
48 | }
49 | int size = 1;
50 | if (args.length > 2 && !ClickHouseChecker.isNullOrBlank(args[2])) {
51 | size = Integer.parseInt(args[2]);
52 | }
53 | while (true) {
54 | try {
55 | count += input.readBuffer(batch).length();
56 | } catch (EOFException e) {
57 | break;
58 | }
59 | }
60 | count = count / size;
61 | } else if ("long".equalsIgnoreCase(deser)) {
62 | while (true) {
63 | try {
64 | input.readBuffer(8).asLong();
65 | } catch (EOFException e) {
66 | break;
67 | }
68 | count++;
69 | }
70 | } else if ("longs".equalsIgnoreCase(deser)) {
71 | int batch = 1000;
72 | if (args.length > 1 && !ClickHouseChecker.isNullOrBlank(args[1])) {
73 | batch = Integer.parseInt(args[1]);
74 | }
75 | while (true) {
76 | try {
77 | count += input.readBuffer(batch).asLongArray().length;
78 | } catch (EOFException e) {
79 | break;
80 | }
81 | }
82 | } else if ("string".equalsIgnoreCase(deser)) {
83 | while (true) {
84 | try {
85 | input.readUnicodeString();
86 | } catch (EOFException e) {
87 | break;
88 | }
89 | count++;
90 | }
91 | } else if ("skip".equalsIgnoreCase(deser)) {
92 | long batch = 8L;
93 | if (args.length > 1 && !ClickHouseChecker.isNullOrBlank(args[1])) {
94 | batch = Long.parseLong(args[1]);
95 | }
96 | count = input.skip(Long.MAX_VALUE) / batch;
97 | } else {
98 | for (ClickHouseRecord r : response.records()) {
99 | count++;
100 | }
101 | }
102 | }
103 |
104 | return count;
105 | }
106 |
107 | static long useJdbc(String url, String sql) throws SQLException {
108 | System.out.println("Using jdbc");
109 | long count = 0L;
110 |
111 | try (Connection conn = DriverManager.getConnection("jdbc:ch:" + url);
112 | Statement stmt = conn.createStatement();
113 | ResultSet rs = stmt.executeQuery(sql)) {
114 | while (rs.next()) {
115 | count++;
116 | }
117 | }
118 |
119 | return count;
120 | }
121 |
122 | public static void main(String[] args) throws Exception {
123 | long time = System.nanoTime();
124 | String url = System.getProperty("url");
125 | if (ClickHouseChecker.isNullOrBlank(url)) {
126 | url = "http://localhost?!compress&format=RowBinaryWithNamesAndTypes";
127 | }
128 | String sql = System.getProperty("sql");
129 | if (ClickHouseChecker.isNullOrBlank(sql)) {
130 | sql = "SELECT number FROM numbers(500000000)";
131 | }
132 |
133 | long count = args != null && args.length > 0 ? useJavaClient(url, sql, args) : useJdbc(url, sql);
134 | System.out.println(String.format("%fs\t%d", (System.nanoTime() - time) / 1000000000.0, count));
135 | }
136 | }
137 |
--------------------------------------------------------------------------------
/ch-bench-java/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #
4 | # Java client:
5 | # - ./run.sh long
6 | # - ./run.sh record
7 | # - ./run.sh skip
8 | # - OPTS="-Xms24m -Xmx24m" ./run.sh long
9 | #
10 | # JDBC driver: ./run.sh
11 | #
12 |
13 | set -e
14 |
15 | : ${SQL:="SELECT number FROM system.numbers_mt LIMIT 500000000"}
16 | : ${URL:='http://localhost?!compress&format=RowBinaryWithNamesAndTypes'}
17 | : ${VER:="0.3.2-patch10"}
18 |
19 | : ${OPTS:=""}
20 | #OPTS="-XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints -XX:+FlightRecorder -XX:StartFlightRecording=disk=false,filename=recorded.jfr,settings=profile"
21 | PKG="clickhouse-jdbc-$VER-all.jar"
22 |
23 |
24 | if [ ! -f "$PKG" ]; then
25 | echo "Downloading $PKG..."
26 | curl -sOL "https://github.com/ClickHouse/clickhouse-jdbc/releases/download/v$VER/$PKG"
27 | else
28 | echo "Found $PKG"
29 | fi
30 |
31 | if [ ! -f "Main.class" ] || [ "Main.java" -nt "Main.class" ]; then
32 | rm -fv Main.class
33 | echo "Compiling..."
34 | javac -cp "$PKG" Main.java
35 | else
36 | echo "Found compiled class"
37 | fi
38 |
39 | echo "Running..."
40 | \time -v java $OPTS -Durl="$URL" -Dsql="$SQL" -cp ".:$PKG" Main $@
41 |
--------------------------------------------------------------------------------
/ch-bench-mailru/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "context"
5 | "database/sql"
6 | "fmt"
7 | "os"
8 | "time"
9 |
10 | _ "github.com/mailru/go-clickhouse"
11 | )
12 |
13 | func run(ctx context.Context) error {
14 | c, err := sql.Open("clickhouse", "http://127.0.0.1:8123/default")
15 | if err != nil {
16 | return err
17 | }
18 |
19 | start := time.Now()
20 | rows, err := c.QueryContext(ctx, "SELECT number FROM system.numbers_mt LIMIT 500000000")
21 | if err != nil {
22 | return err
23 | }
24 | var count int
25 | for rows.Next() {
26 | var v uint64
27 | if err := rows.Scan(&v); err != nil {
28 | return err
29 | }
30 | count++
31 | }
32 |
33 | fmt.Println(time.Since(start).Round(time.Millisecond), count)
34 |
35 | return nil
36 | }
37 |
38 | func main() {
39 | if err := run(context.Background()); err != nil {
40 | fmt.Fprintf(os.Stderr, "Error: %+v\n", err)
41 | os.Exit(2)
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/ch-bench-official/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "context"
5 | "fmt"
6 | "os"
7 | "time"
8 |
9 | "github.com/ClickHouse/clickhouse-go/v2"
10 | )
11 |
12 | func run(ctx context.Context) error {
13 | c, err := clickhouse.Open(&clickhouse.Options{
14 | Addr: []string{"127.0.0.1:9000"},
15 | Auth: clickhouse.Auth{
16 | Database: "default",
17 | Username: "default",
18 | Password: "",
19 | },
20 | })
21 | if err != nil {
22 | return err
23 | }
24 |
25 | start := time.Now()
26 | rows, err := c.Query(ctx, "SELECT number FROM system.numbers_mt LIMIT 500000000")
27 | if err != nil {
28 | return err
29 | }
30 | var count int
31 | for rows.Next() {
32 | var value uint64 // <- value is read
33 | if err := rows.Scan(&value); err != nil {
34 | return err
35 | }
36 | count++
37 | }
38 |
39 | fmt.Println(time.Since(start).Round(time.Millisecond), count)
40 |
41 | return nil
42 | }
43 |
44 | func main() {
45 | if err := run(context.Background()); err != nil {
46 | fmt.Fprintf(os.Stderr, "Error: %+v\n", err)
47 | os.Exit(2)
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/ch-bench-python/main.py:
--------------------------------------------------------------------------------
1 | import sys
2 | from clickhouse_driver import Client
3 |
4 | if __name__ == '__main__':
5 | query = "SELECT number FROM system.numbers_mt LIMIT 500000000"
6 | client = Client.from_url('clickhouse://localhost')
7 |
8 | for row in client.execute_iter(query):
9 | pass
10 |
--------------------------------------------------------------------------------
/ch-bench-python/requrements.txt:
--------------------------------------------------------------------------------
1 | backports.zoneinfo==0.2.1
2 | clickhouse-driver==0.2.2
3 | pytz-deprecation-shim==0.1.0.post0
4 | tzdata==2021.5
5 | tzlocal==4.1
6 |
--------------------------------------------------------------------------------
/ch-bench-rust-driver/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 |
--------------------------------------------------------------------------------
/ch-bench-rust-driver/Cargo.lock:
--------------------------------------------------------------------------------
1 | # This file is automatically @generated by Cargo.
2 | # It is not intended for manual editing.
3 | version = 3
4 |
5 | [[package]]
6 | name = "autocfg"
7 | version = "1.0.1"
8 | source = "registry+https://github.com/rust-lang/crates.io-index"
9 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
10 |
11 | [[package]]
12 | name = "bitflags"
13 | version = "1.3.2"
14 | source = "registry+https://github.com/rust-lang/crates.io-index"
15 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
16 |
17 | [[package]]
18 | name = "byteorder"
19 | version = "1.4.3"
20 | source = "registry+https://github.com/rust-lang/crates.io-index"
21 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
22 |
23 | [[package]]
24 | name = "bytes"
25 | version = "1.1.0"
26 | source = "registry+https://github.com/rust-lang/crates.io-index"
27 | checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
28 |
29 | [[package]]
30 | name = "cc"
31 | version = "1.0.72"
32 | source = "registry+https://github.com/rust-lang/crates.io-index"
33 | checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee"
34 |
35 | [[package]]
36 | name = "cfg-if"
37 | version = "1.0.0"
38 | source = "registry+https://github.com/rust-lang/crates.io-index"
39 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
40 |
41 | [[package]]
42 | name = "ch-bench-rust-driver"
43 | version = "0.1.0"
44 | dependencies = [
45 | "clickhouse-driver",
46 | "futures",
47 | "futures-util",
48 | "tokio",
49 | ]
50 |
51 | [[package]]
52 | name = "chrono"
53 | version = "0.4.19"
54 | source = "registry+https://github.com/rust-lang/crates.io-index"
55 | checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
56 | dependencies = [
57 | "libc",
58 | "num-integer",
59 | "num-traits",
60 | "time",
61 | "winapi",
62 | ]
63 |
64 | [[package]]
65 | name = "chrono-tz"
66 | version = "0.6.1"
67 | source = "registry+https://github.com/rust-lang/crates.io-index"
68 | checksum = "58549f1842da3080ce63002102d5bc954c7bc843d4f47818e642abdc36253552"
69 | dependencies = [
70 | "chrono",
71 | "chrono-tz-build",
72 | "phf",
73 | ]
74 |
75 | [[package]]
76 | name = "chrono-tz-build"
77 | version = "0.0.2"
78 | source = "registry+https://github.com/rust-lang/crates.io-index"
79 | checksum = "db058d493fb2f65f41861bfed7e3fe6335264a9f0f92710cab5bdf01fef09069"
80 | dependencies = [
81 | "parse-zoneinfo",
82 | "phf",
83 | "phf_codegen",
84 | ]
85 |
86 | [[package]]
87 | name = "clickhouse-driver"
88 | version = "0.1.0-alpha.3"
89 | source = "git+https://github.com/datafuse-extras/clickhouse_driver#9d2133f093881ca29554e7780ca490fb094a3692"
90 | dependencies = [
91 | "byteorder",
92 | "bytes",
93 | "chrono",
94 | "chrono-tz",
95 | "crossbeam",
96 | "futures",
97 | "hostname",
98 | "lazy_static",
99 | "log",
100 | "lz4",
101 | "naive-cityhash",
102 | "parking_lot",
103 | "pin-project-lite",
104 | "rand",
105 | "slab",
106 | "thiserror",
107 | "tokio",
108 | "url",
109 | "uuid",
110 | ]
111 |
112 | [[package]]
113 | name = "crossbeam"
114 | version = "0.8.1"
115 | source = "registry+https://github.com/rust-lang/crates.io-index"
116 | checksum = "4ae5588f6b3c3cb05239e90bd110f257254aecd01e4635400391aeae07497845"
117 | dependencies = [
118 | "cfg-if",
119 | "crossbeam-channel",
120 | "crossbeam-deque",
121 | "crossbeam-epoch",
122 | "crossbeam-queue",
123 | "crossbeam-utils",
124 | ]
125 |
126 | [[package]]
127 | name = "crossbeam-channel"
128 | version = "0.5.1"
129 | source = "registry+https://github.com/rust-lang/crates.io-index"
130 | checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4"
131 | dependencies = [
132 | "cfg-if",
133 | "crossbeam-utils",
134 | ]
135 |
136 | [[package]]
137 | name = "crossbeam-deque"
138 | version = "0.8.1"
139 | source = "registry+https://github.com/rust-lang/crates.io-index"
140 | checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e"
141 | dependencies = [
142 | "cfg-if",
143 | "crossbeam-epoch",
144 | "crossbeam-utils",
145 | ]
146 |
147 | [[package]]
148 | name = "crossbeam-epoch"
149 | version = "0.9.5"
150 | source = "registry+https://github.com/rust-lang/crates.io-index"
151 | checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd"
152 | dependencies = [
153 | "cfg-if",
154 | "crossbeam-utils",
155 | "lazy_static",
156 | "memoffset",
157 | "scopeguard",
158 | ]
159 |
160 | [[package]]
161 | name = "crossbeam-queue"
162 | version = "0.3.2"
163 | source = "registry+https://github.com/rust-lang/crates.io-index"
164 | checksum = "9b10ddc024425c88c2ad148c1b0fd53f4c6d38db9697c9f1588381212fa657c9"
165 | dependencies = [
166 | "cfg-if",
167 | "crossbeam-utils",
168 | ]
169 |
170 | [[package]]
171 | name = "crossbeam-utils"
172 | version = "0.8.8"
173 | source = "registry+https://github.com/rust-lang/crates.io-index"
174 | checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38"
175 | dependencies = [
176 | "cfg-if",
177 | "lazy_static",
178 | ]
179 |
180 | [[package]]
181 | name = "form_urlencoded"
182 | version = "1.0.1"
183 | source = "registry+https://github.com/rust-lang/crates.io-index"
184 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
185 | dependencies = [
186 | "matches",
187 | "percent-encoding",
188 | ]
189 |
190 | [[package]]
191 | name = "futures"
192 | version = "0.3.19"
193 | source = "registry+https://github.com/rust-lang/crates.io-index"
194 | checksum = "28560757fe2bb34e79f907794bb6b22ae8b0e5c669b638a1132f2592b19035b4"
195 | dependencies = [
196 | "futures-channel",
197 | "futures-core",
198 | "futures-executor",
199 | "futures-io",
200 | "futures-sink",
201 | "futures-task",
202 | "futures-util",
203 | ]
204 |
205 | [[package]]
206 | name = "futures-channel"
207 | version = "0.3.19"
208 | source = "registry+https://github.com/rust-lang/crates.io-index"
209 | checksum = "ba3dda0b6588335f360afc675d0564c17a77a2bda81ca178a4b6081bd86c7f0b"
210 | dependencies = [
211 | "futures-core",
212 | "futures-sink",
213 | ]
214 |
215 | [[package]]
216 | name = "futures-core"
217 | version = "0.3.19"
218 | source = "registry+https://github.com/rust-lang/crates.io-index"
219 | checksum = "d0c8ff0461b82559810cdccfde3215c3f373807f5e5232b71479bff7bb2583d7"
220 |
221 | [[package]]
222 | name = "futures-executor"
223 | version = "0.3.19"
224 | source = "registry+https://github.com/rust-lang/crates.io-index"
225 | checksum = "29d6d2ff5bb10fb95c85b8ce46538a2e5f5e7fdc755623a7d4529ab8a4ed9d2a"
226 | dependencies = [
227 | "futures-core",
228 | "futures-task",
229 | "futures-util",
230 | ]
231 |
232 | [[package]]
233 | name = "futures-io"
234 | version = "0.3.19"
235 | source = "registry+https://github.com/rust-lang/crates.io-index"
236 | checksum = "b1f9d34af5a1aac6fb380f735fe510746c38067c5bf16c7fd250280503c971b2"
237 |
238 | [[package]]
239 | name = "futures-macro"
240 | version = "0.3.19"
241 | source = "registry+https://github.com/rust-lang/crates.io-index"
242 | checksum = "6dbd947adfffb0efc70599b3ddcf7b5597bb5fa9e245eb99f62b3a5f7bb8bd3c"
243 | dependencies = [
244 | "proc-macro2",
245 | "quote",
246 | "syn",
247 | ]
248 |
249 | [[package]]
250 | name = "futures-sink"
251 | version = "0.3.19"
252 | source = "registry+https://github.com/rust-lang/crates.io-index"
253 | checksum = "e3055baccb68d74ff6480350f8d6eb8fcfa3aa11bdc1a1ae3afdd0514617d508"
254 |
255 | [[package]]
256 | name = "futures-task"
257 | version = "0.3.19"
258 | source = "registry+https://github.com/rust-lang/crates.io-index"
259 | checksum = "6ee7c6485c30167ce4dfb83ac568a849fe53274c831081476ee13e0dce1aad72"
260 |
261 | [[package]]
262 | name = "futures-util"
263 | version = "0.3.19"
264 | source = "registry+https://github.com/rust-lang/crates.io-index"
265 | checksum = "d9b5cf40b47a271f77a8b1bec03ca09044d99d2372c0de244e66430761127164"
266 | dependencies = [
267 | "futures-channel",
268 | "futures-core",
269 | "futures-io",
270 | "futures-macro",
271 | "futures-sink",
272 | "futures-task",
273 | "memchr",
274 | "pin-project-lite",
275 | "pin-utils",
276 | "slab",
277 | ]
278 |
279 | [[package]]
280 | name = "getrandom"
281 | version = "0.2.4"
282 | source = "registry+https://github.com/rust-lang/crates.io-index"
283 | checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c"
284 | dependencies = [
285 | "cfg-if",
286 | "libc",
287 | "wasi",
288 | ]
289 |
290 | [[package]]
291 | name = "hermit-abi"
292 | version = "0.1.19"
293 | source = "registry+https://github.com/rust-lang/crates.io-index"
294 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
295 | dependencies = [
296 | "libc",
297 | ]
298 |
299 | [[package]]
300 | name = "hostname"
301 | version = "0.3.1"
302 | source = "registry+https://github.com/rust-lang/crates.io-index"
303 | checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
304 | dependencies = [
305 | "libc",
306 | "match_cfg",
307 | "winapi",
308 | ]
309 |
310 | [[package]]
311 | name = "idna"
312 | version = "0.2.3"
313 | source = "registry+https://github.com/rust-lang/crates.io-index"
314 | checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
315 | dependencies = [
316 | "matches",
317 | "unicode-bidi",
318 | "unicode-normalization",
319 | ]
320 |
321 | [[package]]
322 | name = "instant"
323 | version = "0.1.12"
324 | source = "registry+https://github.com/rust-lang/crates.io-index"
325 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
326 | dependencies = [
327 | "cfg-if",
328 | ]
329 |
330 | [[package]]
331 | name = "lazy_static"
332 | version = "1.4.0"
333 | source = "registry+https://github.com/rust-lang/crates.io-index"
334 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
335 |
336 | [[package]]
337 | name = "libc"
338 | version = "0.2.109"
339 | source = "registry+https://github.com/rust-lang/crates.io-index"
340 | checksum = "f98a04dce437184842841303488f70d0188c5f51437d2a834dc097eafa909a01"
341 |
342 | [[package]]
343 | name = "lock_api"
344 | version = "0.4.5"
345 | source = "registry+https://github.com/rust-lang/crates.io-index"
346 | checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109"
347 | dependencies = [
348 | "scopeguard",
349 | ]
350 |
351 | [[package]]
352 | name = "log"
353 | version = "0.4.14"
354 | source = "registry+https://github.com/rust-lang/crates.io-index"
355 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
356 | dependencies = [
357 | "cfg-if",
358 | ]
359 |
360 | [[package]]
361 | name = "lz4"
362 | version = "1.23.2"
363 | source = "registry+https://github.com/rust-lang/crates.io-index"
364 | checksum = "aac20ed6991e01bf6a2e68cc73df2b389707403662a8ba89f68511fb340f724c"
365 | dependencies = [
366 | "libc",
367 | "lz4-sys",
368 | ]
369 |
370 | [[package]]
371 | name = "lz4-sys"
372 | version = "1.9.4"
373 | source = "registry+https://github.com/rust-lang/crates.io-index"
374 | checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900"
375 | dependencies = [
376 | "cc",
377 | "libc",
378 | ]
379 |
380 | [[package]]
381 | name = "match_cfg"
382 | version = "0.1.0"
383 | source = "registry+https://github.com/rust-lang/crates.io-index"
384 | checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
385 |
386 | [[package]]
387 | name = "matches"
388 | version = "0.1.9"
389 | source = "registry+https://github.com/rust-lang/crates.io-index"
390 | checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
391 |
392 | [[package]]
393 | name = "memchr"
394 | version = "2.4.1"
395 | source = "registry+https://github.com/rust-lang/crates.io-index"
396 | checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
397 |
398 | [[package]]
399 | name = "memoffset"
400 | version = "0.6.5"
401 | source = "registry+https://github.com/rust-lang/crates.io-index"
402 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
403 | dependencies = [
404 | "autocfg",
405 | ]
406 |
407 | [[package]]
408 | name = "mio"
409 | version = "0.7.14"
410 | source = "registry+https://github.com/rust-lang/crates.io-index"
411 | checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc"
412 | dependencies = [
413 | "libc",
414 | "log",
415 | "miow",
416 | "ntapi",
417 | "winapi",
418 | ]
419 |
420 | [[package]]
421 | name = "miow"
422 | version = "0.3.7"
423 | source = "registry+https://github.com/rust-lang/crates.io-index"
424 | checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
425 | dependencies = [
426 | "winapi",
427 | ]
428 |
429 | [[package]]
430 | name = "naive-cityhash"
431 | version = "0.1.0"
432 | source = "registry+https://github.com/rust-lang/crates.io-index"
433 | checksum = "1e5641a0f564cf7c57a008d3ade6de749729f4eadf74e9222560c6a3a0d38cd2"
434 |
435 | [[package]]
436 | name = "ntapi"
437 | version = "0.3.6"
438 | source = "registry+https://github.com/rust-lang/crates.io-index"
439 | checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
440 | dependencies = [
441 | "winapi",
442 | ]
443 |
444 | [[package]]
445 | name = "num-integer"
446 | version = "0.1.44"
447 | source = "registry+https://github.com/rust-lang/crates.io-index"
448 | checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
449 | dependencies = [
450 | "autocfg",
451 | "num-traits",
452 | ]
453 |
454 | [[package]]
455 | name = "num-traits"
456 | version = "0.2.14"
457 | source = "registry+https://github.com/rust-lang/crates.io-index"
458 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
459 | dependencies = [
460 | "autocfg",
461 | ]
462 |
463 | [[package]]
464 | name = "num_cpus"
465 | version = "1.13.0"
466 | source = "registry+https://github.com/rust-lang/crates.io-index"
467 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
468 | dependencies = [
469 | "hermit-abi",
470 | "libc",
471 | ]
472 |
473 | [[package]]
474 | name = "once_cell"
475 | version = "1.8.0"
476 | source = "registry+https://github.com/rust-lang/crates.io-index"
477 | checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56"
478 |
479 | [[package]]
480 | name = "parking_lot"
481 | version = "0.11.2"
482 | source = "registry+https://github.com/rust-lang/crates.io-index"
483 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
484 | dependencies = [
485 | "instant",
486 | "lock_api",
487 | "parking_lot_core",
488 | ]
489 |
490 | [[package]]
491 | name = "parking_lot_core"
492 | version = "0.8.5"
493 | source = "registry+https://github.com/rust-lang/crates.io-index"
494 | checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216"
495 | dependencies = [
496 | "cfg-if",
497 | "instant",
498 | "libc",
499 | "redox_syscall",
500 | "smallvec",
501 | "winapi",
502 | ]
503 |
504 | [[package]]
505 | name = "parse-zoneinfo"
506 | version = "0.3.0"
507 | source = "registry+https://github.com/rust-lang/crates.io-index"
508 | checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41"
509 | dependencies = [
510 | "regex",
511 | ]
512 |
513 | [[package]]
514 | name = "percent-encoding"
515 | version = "2.1.0"
516 | source = "registry+https://github.com/rust-lang/crates.io-index"
517 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
518 |
519 | [[package]]
520 | name = "phf"
521 | version = "0.10.1"
522 | source = "registry+https://github.com/rust-lang/crates.io-index"
523 | checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259"
524 | dependencies = [
525 | "phf_shared",
526 | ]
527 |
528 | [[package]]
529 | name = "phf_codegen"
530 | version = "0.10.0"
531 | source = "registry+https://github.com/rust-lang/crates.io-index"
532 | checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd"
533 | dependencies = [
534 | "phf_generator",
535 | "phf_shared",
536 | ]
537 |
538 | [[package]]
539 | name = "phf_generator"
540 | version = "0.10.0"
541 | source = "registry+https://github.com/rust-lang/crates.io-index"
542 | checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6"
543 | dependencies = [
544 | "phf_shared",
545 | "rand",
546 | ]
547 |
548 | [[package]]
549 | name = "phf_shared"
550 | version = "0.10.0"
551 | source = "registry+https://github.com/rust-lang/crates.io-index"
552 | checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096"
553 | dependencies = [
554 | "siphasher",
555 | "uncased",
556 | ]
557 |
558 | [[package]]
559 | name = "pin-project-lite"
560 | version = "0.2.8"
561 | source = "registry+https://github.com/rust-lang/crates.io-index"
562 | checksum = "e280fbe77cc62c91527259e9442153f4688736748d24660126286329742b4c6c"
563 |
564 | [[package]]
565 | name = "pin-utils"
566 | version = "0.1.0"
567 | source = "registry+https://github.com/rust-lang/crates.io-index"
568 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
569 |
570 | [[package]]
571 | name = "ppv-lite86"
572 | version = "0.2.16"
573 | source = "registry+https://github.com/rust-lang/crates.io-index"
574 | checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
575 |
576 | [[package]]
577 | name = "proc-macro2"
578 | version = "1.0.33"
579 | source = "registry+https://github.com/rust-lang/crates.io-index"
580 | checksum = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a"
581 | dependencies = [
582 | "unicode-xid",
583 | ]
584 |
585 | [[package]]
586 | name = "quote"
587 | version = "1.0.10"
588 | source = "registry+https://github.com/rust-lang/crates.io-index"
589 | checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
590 | dependencies = [
591 | "proc-macro2",
592 | ]
593 |
594 | [[package]]
595 | name = "rand"
596 | version = "0.8.4"
597 | source = "registry+https://github.com/rust-lang/crates.io-index"
598 | checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8"
599 | dependencies = [
600 | "libc",
601 | "rand_chacha",
602 | "rand_core",
603 | "rand_hc",
604 | ]
605 |
606 | [[package]]
607 | name = "rand_chacha"
608 | version = "0.3.1"
609 | source = "registry+https://github.com/rust-lang/crates.io-index"
610 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
611 | dependencies = [
612 | "ppv-lite86",
613 | "rand_core",
614 | ]
615 |
616 | [[package]]
617 | name = "rand_core"
618 | version = "0.6.3"
619 | source = "registry+https://github.com/rust-lang/crates.io-index"
620 | checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
621 | dependencies = [
622 | "getrandom",
623 | ]
624 |
625 | [[package]]
626 | name = "rand_hc"
627 | version = "0.3.1"
628 | source = "registry+https://github.com/rust-lang/crates.io-index"
629 | checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7"
630 | dependencies = [
631 | "rand_core",
632 | ]
633 |
634 | [[package]]
635 | name = "redox_syscall"
636 | version = "0.2.10"
637 | source = "registry+https://github.com/rust-lang/crates.io-index"
638 | checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff"
639 | dependencies = [
640 | "bitflags",
641 | ]
642 |
643 | [[package]]
644 | name = "regex"
645 | version = "1.5.6"
646 | source = "registry+https://github.com/rust-lang/crates.io-index"
647 | checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1"
648 | dependencies = [
649 | "regex-syntax",
650 | ]
651 |
652 | [[package]]
653 | name = "regex-syntax"
654 | version = "0.6.26"
655 | source = "registry+https://github.com/rust-lang/crates.io-index"
656 | checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64"
657 |
658 | [[package]]
659 | name = "scopeguard"
660 | version = "1.1.0"
661 | source = "registry+https://github.com/rust-lang/crates.io-index"
662 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
663 |
664 | [[package]]
665 | name = "signal-hook-registry"
666 | version = "1.4.0"
667 | source = "registry+https://github.com/rust-lang/crates.io-index"
668 | checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"
669 | dependencies = [
670 | "libc",
671 | ]
672 |
673 | [[package]]
674 | name = "siphasher"
675 | version = "0.3.8"
676 | source = "registry+https://github.com/rust-lang/crates.io-index"
677 | checksum = "ba1eead9e94aa5a2e02de9e7839f96a007f686ae7a1d57c7797774810d24908a"
678 |
679 | [[package]]
680 | name = "slab"
681 | version = "0.4.5"
682 | source = "registry+https://github.com/rust-lang/crates.io-index"
683 | checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"
684 |
685 | [[package]]
686 | name = "smallvec"
687 | version = "1.7.0"
688 | source = "registry+https://github.com/rust-lang/crates.io-index"
689 | checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309"
690 |
691 | [[package]]
692 | name = "syn"
693 | version = "1.0.82"
694 | source = "registry+https://github.com/rust-lang/crates.io-index"
695 | checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59"
696 | dependencies = [
697 | "proc-macro2",
698 | "quote",
699 | "unicode-xid",
700 | ]
701 |
702 | [[package]]
703 | name = "thiserror"
704 | version = "1.0.30"
705 | source = "registry+https://github.com/rust-lang/crates.io-index"
706 | checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
707 | dependencies = [
708 | "thiserror-impl",
709 | ]
710 |
711 | [[package]]
712 | name = "thiserror-impl"
713 | version = "1.0.30"
714 | source = "registry+https://github.com/rust-lang/crates.io-index"
715 | checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
716 | dependencies = [
717 | "proc-macro2",
718 | "quote",
719 | "syn",
720 | ]
721 |
722 | [[package]]
723 | name = "time"
724 | version = "0.1.44"
725 | source = "registry+https://github.com/rust-lang/crates.io-index"
726 | checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
727 | dependencies = [
728 | "libc",
729 | "wasi",
730 | "winapi",
731 | ]
732 |
733 | [[package]]
734 | name = "tinyvec"
735 | version = "1.5.1"
736 | source = "registry+https://github.com/rust-lang/crates.io-index"
737 | checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2"
738 | dependencies = [
739 | "tinyvec_macros",
740 | ]
741 |
742 | [[package]]
743 | name = "tinyvec_macros"
744 | version = "0.1.0"
745 | source = "registry+https://github.com/rust-lang/crates.io-index"
746 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
747 |
748 | [[package]]
749 | name = "tokio"
750 | version = "1.15.0"
751 | source = "registry+https://github.com/rust-lang/crates.io-index"
752 | checksum = "fbbf1c778ec206785635ce8ad57fe52b3009ae9e0c9f574a728f3049d3e55838"
753 | dependencies = [
754 | "bytes",
755 | "libc",
756 | "memchr",
757 | "mio",
758 | "num_cpus",
759 | "once_cell",
760 | "parking_lot",
761 | "pin-project-lite",
762 | "signal-hook-registry",
763 | "tokio-macros",
764 | "winapi",
765 | ]
766 |
767 | [[package]]
768 | name = "tokio-macros"
769 | version = "1.7.0"
770 | source = "registry+https://github.com/rust-lang/crates.io-index"
771 | checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7"
772 | dependencies = [
773 | "proc-macro2",
774 | "quote",
775 | "syn",
776 | ]
777 |
778 | [[package]]
779 | name = "uncased"
780 | version = "0.9.6"
781 | source = "registry+https://github.com/rust-lang/crates.io-index"
782 | checksum = "5baeed7327e25054889b9bd4f975f32e5f4c5d434042d59ab6cd4142c0a76ed0"
783 | dependencies = [
784 | "version_check",
785 | ]
786 |
787 | [[package]]
788 | name = "unicode-bidi"
789 | version = "0.3.7"
790 | source = "registry+https://github.com/rust-lang/crates.io-index"
791 | checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f"
792 |
793 | [[package]]
794 | name = "unicode-normalization"
795 | version = "0.1.19"
796 | source = "registry+https://github.com/rust-lang/crates.io-index"
797 | checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9"
798 | dependencies = [
799 | "tinyvec",
800 | ]
801 |
802 | [[package]]
803 | name = "unicode-xid"
804 | version = "0.2.2"
805 | source = "registry+https://github.com/rust-lang/crates.io-index"
806 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
807 |
808 | [[package]]
809 | name = "url"
810 | version = "2.2.2"
811 | source = "registry+https://github.com/rust-lang/crates.io-index"
812 | checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"
813 | dependencies = [
814 | "form_urlencoded",
815 | "idna",
816 | "matches",
817 | "percent-encoding",
818 | ]
819 |
820 | [[package]]
821 | name = "uuid"
822 | version = "0.8.2"
823 | source = "registry+https://github.com/rust-lang/crates.io-index"
824 | checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
825 | dependencies = [
826 | "getrandom",
827 | ]
828 |
829 | [[package]]
830 | name = "version_check"
831 | version = "0.9.4"
832 | source = "registry+https://github.com/rust-lang/crates.io-index"
833 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
834 |
835 | [[package]]
836 | name = "wasi"
837 | version = "0.10.0+wasi-snapshot-preview1"
838 | source = "registry+https://github.com/rust-lang/crates.io-index"
839 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
840 |
841 | [[package]]
842 | name = "winapi"
843 | version = "0.3.9"
844 | source = "registry+https://github.com/rust-lang/crates.io-index"
845 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
846 | dependencies = [
847 | "winapi-i686-pc-windows-gnu",
848 | "winapi-x86_64-pc-windows-gnu",
849 | ]
850 |
851 | [[package]]
852 | name = "winapi-i686-pc-windows-gnu"
853 | version = "0.4.0"
854 | source = "registry+https://github.com/rust-lang/crates.io-index"
855 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
856 |
857 | [[package]]
858 | name = "winapi-x86_64-pc-windows-gnu"
859 | version = "0.4.0"
860 | source = "registry+https://github.com/rust-lang/crates.io-index"
861 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
862 |
--------------------------------------------------------------------------------
/ch-bench-rust-driver/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "ch-bench-rust-driver"
3 | version = "0.1.0"
4 | edition = "2018"
5 |
6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7 |
8 | [dependencies]
9 | futures = "*"
10 | clickhouse-driver = { git = "https://github.com/datafuse-extras/clickhouse_driver"}
11 | futures-util = "*"
12 | tokio = { version = "1.15.0", features = ["full"] }
13 |
14 | [profile.release-adjusted]
15 | inherits = "release"
16 | lto = true
17 | codegen-units = 1
18 |
--------------------------------------------------------------------------------
/ch-bench-rust-driver/src/main.rs:
--------------------------------------------------------------------------------
1 | use clickhouse_driver::prelude::*;
2 | use std::{error::Error, time::Instant};
3 |
4 | async fn execute(database_url: String) -> Result<(), Box> {
5 | let pool = Pool::create(database_url.as_str())?;
6 | let mut conn = pool.connection().await?;
7 | let mut total: u64 = 0;
8 | let start = Instant::now();
9 |
10 | let mut result = conn
11 | .query("SELECT number FROM system.numbers_mt LIMIT 500000000")
12 | .await?;
13 |
14 | while let Some(block) = result.next().await? {
15 | total += block.row_count();
16 | }
17 | let elapsed = start.elapsed();
18 | println!("Rows: {}, elspsed: {} ms", total, elapsed.as_millis());
19 | Ok(())
20 | }
21 |
22 | #[tokio::main]
23 | async fn main() -> Result<(), Box> {
24 | execute("tcp://localhost:9000?compression=none".to_string()).await?;
25 |
26 | Ok(())
27 | }
28 |
--------------------------------------------------------------------------------
/ch-bench-rust-http/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 |
--------------------------------------------------------------------------------
/ch-bench-rust-http/Cargo.lock:
--------------------------------------------------------------------------------
1 | # This file is automatically @generated by Cargo.
2 | # It is not intended for manual editing.
3 | version = 3
4 |
5 | [[package]]
6 | name = "autocfg"
7 | version = "1.0.1"
8 | source = "registry+https://github.com/rust-lang/crates.io-index"
9 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
10 |
11 | [[package]]
12 | name = "bitflags"
13 | version = "1.3.2"
14 | source = "registry+https://github.com/rust-lang/crates.io-index"
15 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
16 |
17 | [[package]]
18 | name = "bytes"
19 | version = "1.1.0"
20 | source = "registry+https://github.com/rust-lang/crates.io-index"
21 | checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
22 |
23 | [[package]]
24 | name = "cc"
25 | version = "1.0.72"
26 | source = "registry+https://github.com/rust-lang/crates.io-index"
27 | checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee"
28 |
29 | [[package]]
30 | name = "cfg-if"
31 | version = "1.0.0"
32 | source = "registry+https://github.com/rust-lang/crates.io-index"
33 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
34 |
35 | [[package]]
36 | name = "ch-bench-rust-http"
37 | version = "0.1.0"
38 | dependencies = [
39 | "clickhouse",
40 | "serde",
41 | "tokio",
42 | ]
43 |
44 | [[package]]
45 | name = "clickhouse"
46 | version = "0.9.3"
47 | source = "registry+https://github.com/rust-lang/crates.io-index"
48 | checksum = "c6b25060b30e65a4844ca2cc0567545f087d2e87e81cb2ffae12dbf220a23b0f"
49 | dependencies = [
50 | "bytes",
51 | "clickhouse-derive",
52 | "clickhouse-rs-cityhash-sys",
53 | "futures",
54 | "hyper",
55 | "lz4-sys",
56 | "serde",
57 | "smallvec",
58 | "static_assertions",
59 | "thiserror",
60 | "tokio",
61 | "url",
62 | ]
63 |
64 | [[package]]
65 | name = "clickhouse-derive"
66 | version = "0.1.1"
67 | source = "registry+https://github.com/rust-lang/crates.io-index"
68 | checksum = "18af5425854858c507eec70f7deb4d5d8cec4216fcb086283a78872387281ea5"
69 | dependencies = [
70 | "proc-macro2",
71 | "quote",
72 | "serde_derive_internals",
73 | "syn",
74 | ]
75 |
76 | [[package]]
77 | name = "clickhouse-rs-cityhash-sys"
78 | version = "0.1.2"
79 | source = "registry+https://github.com/rust-lang/crates.io-index"
80 | checksum = "4baf9d4700a28d6cb600e17ed6ae2b43298a5245f1f76b4eab63027ebfd592b9"
81 | dependencies = [
82 | "cc",
83 | ]
84 |
85 | [[package]]
86 | name = "fnv"
87 | version = "1.0.7"
88 | source = "registry+https://github.com/rust-lang/crates.io-index"
89 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
90 |
91 | [[package]]
92 | name = "form_urlencoded"
93 | version = "1.0.1"
94 | source = "registry+https://github.com/rust-lang/crates.io-index"
95 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
96 | dependencies = [
97 | "matches",
98 | "percent-encoding",
99 | ]
100 |
101 | [[package]]
102 | name = "futures"
103 | version = "0.3.18"
104 | source = "registry+https://github.com/rust-lang/crates.io-index"
105 | checksum = "8cd0210d8c325c245ff06fd95a3b13689a1a276ac8cfa8e8720cb840bfb84b9e"
106 | dependencies = [
107 | "futures-channel",
108 | "futures-core",
109 | "futures-executor",
110 | "futures-io",
111 | "futures-sink",
112 | "futures-task",
113 | "futures-util",
114 | ]
115 |
116 | [[package]]
117 | name = "futures-channel"
118 | version = "0.3.18"
119 | source = "registry+https://github.com/rust-lang/crates.io-index"
120 | checksum = "7fc8cd39e3dbf865f7340dce6a2d401d24fd37c6fe6c4f0ee0de8bfca2252d27"
121 | dependencies = [
122 | "futures-core",
123 | "futures-sink",
124 | ]
125 |
126 | [[package]]
127 | name = "futures-core"
128 | version = "0.3.18"
129 | source = "registry+https://github.com/rust-lang/crates.io-index"
130 | checksum = "629316e42fe7c2a0b9a65b47d159ceaa5453ab14e8f0a3c5eedbb8cd55b4a445"
131 |
132 | [[package]]
133 | name = "futures-executor"
134 | version = "0.3.18"
135 | source = "registry+https://github.com/rust-lang/crates.io-index"
136 | checksum = "7b808bf53348a36cab739d7e04755909b9fcaaa69b7d7e588b37b6ec62704c97"
137 | dependencies = [
138 | "futures-core",
139 | "futures-task",
140 | "futures-util",
141 | ]
142 |
143 | [[package]]
144 | name = "futures-io"
145 | version = "0.3.18"
146 | source = "registry+https://github.com/rust-lang/crates.io-index"
147 | checksum = "e481354db6b5c353246ccf6a728b0c5511d752c08da7260546fc0933869daa11"
148 |
149 | [[package]]
150 | name = "futures-macro"
151 | version = "0.3.18"
152 | source = "registry+https://github.com/rust-lang/crates.io-index"
153 | checksum = "a89f17b21645bc4ed773c69af9c9a0effd4a3f1a3876eadd453469f8854e7fdd"
154 | dependencies = [
155 | "proc-macro2",
156 | "quote",
157 | "syn",
158 | ]
159 |
160 | [[package]]
161 | name = "futures-sink"
162 | version = "0.3.18"
163 | source = "registry+https://github.com/rust-lang/crates.io-index"
164 | checksum = "996c6442437b62d21a32cd9906f9c41e7dc1e19a9579843fad948696769305af"
165 |
166 | [[package]]
167 | name = "futures-task"
168 | version = "0.3.18"
169 | source = "registry+https://github.com/rust-lang/crates.io-index"
170 | checksum = "dabf1872aaab32c886832f2276d2f5399887e2bd613698a02359e4ea83f8de12"
171 |
172 | [[package]]
173 | name = "futures-util"
174 | version = "0.3.18"
175 | source = "registry+https://github.com/rust-lang/crates.io-index"
176 | checksum = "41d22213122356472061ac0f1ab2cee28d2bac8491410fd68c2af53d1cedb83e"
177 | dependencies = [
178 | "futures-channel",
179 | "futures-core",
180 | "futures-io",
181 | "futures-macro",
182 | "futures-sink",
183 | "futures-task",
184 | "memchr",
185 | "pin-project-lite",
186 | "pin-utils",
187 | "slab",
188 | ]
189 |
190 | [[package]]
191 | name = "hermit-abi"
192 | version = "0.1.19"
193 | source = "registry+https://github.com/rust-lang/crates.io-index"
194 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
195 | dependencies = [
196 | "libc",
197 | ]
198 |
199 | [[package]]
200 | name = "http"
201 | version = "0.2.6"
202 | source = "registry+https://github.com/rust-lang/crates.io-index"
203 | checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03"
204 | dependencies = [
205 | "bytes",
206 | "fnv",
207 | "itoa 1.0.1",
208 | ]
209 |
210 | [[package]]
211 | name = "http-body"
212 | version = "0.4.4"
213 | source = "registry+https://github.com/rust-lang/crates.io-index"
214 | checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6"
215 | dependencies = [
216 | "bytes",
217 | "http",
218 | "pin-project-lite",
219 | ]
220 |
221 | [[package]]
222 | name = "httparse"
223 | version = "1.5.1"
224 | source = "registry+https://github.com/rust-lang/crates.io-index"
225 | checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503"
226 |
227 | [[package]]
228 | name = "httpdate"
229 | version = "1.0.2"
230 | source = "registry+https://github.com/rust-lang/crates.io-index"
231 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421"
232 |
233 | [[package]]
234 | name = "hyper"
235 | version = "0.14.16"
236 | source = "registry+https://github.com/rust-lang/crates.io-index"
237 | checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55"
238 | dependencies = [
239 | "bytes",
240 | "futures-channel",
241 | "futures-core",
242 | "futures-util",
243 | "http",
244 | "http-body",
245 | "httparse",
246 | "httpdate",
247 | "itoa 0.4.8",
248 | "pin-project-lite",
249 | "socket2",
250 | "tokio",
251 | "tower-service",
252 | "tracing",
253 | "want",
254 | ]
255 |
256 | [[package]]
257 | name = "idna"
258 | version = "0.2.3"
259 | source = "registry+https://github.com/rust-lang/crates.io-index"
260 | checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
261 | dependencies = [
262 | "matches",
263 | "unicode-bidi",
264 | "unicode-normalization",
265 | ]
266 |
267 | [[package]]
268 | name = "instant"
269 | version = "0.1.12"
270 | source = "registry+https://github.com/rust-lang/crates.io-index"
271 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
272 | dependencies = [
273 | "cfg-if",
274 | ]
275 |
276 | [[package]]
277 | name = "itoa"
278 | version = "0.4.8"
279 | source = "registry+https://github.com/rust-lang/crates.io-index"
280 | checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4"
281 |
282 | [[package]]
283 | name = "itoa"
284 | version = "1.0.1"
285 | source = "registry+https://github.com/rust-lang/crates.io-index"
286 | checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35"
287 |
288 | [[package]]
289 | name = "lazy_static"
290 | version = "1.4.0"
291 | source = "registry+https://github.com/rust-lang/crates.io-index"
292 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
293 |
294 | [[package]]
295 | name = "libc"
296 | version = "0.2.109"
297 | source = "registry+https://github.com/rust-lang/crates.io-index"
298 | checksum = "f98a04dce437184842841303488f70d0188c5f51437d2a834dc097eafa909a01"
299 |
300 | [[package]]
301 | name = "lock_api"
302 | version = "0.4.5"
303 | source = "registry+https://github.com/rust-lang/crates.io-index"
304 | checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109"
305 | dependencies = [
306 | "scopeguard",
307 | ]
308 |
309 | [[package]]
310 | name = "log"
311 | version = "0.4.14"
312 | source = "registry+https://github.com/rust-lang/crates.io-index"
313 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
314 | dependencies = [
315 | "cfg-if",
316 | ]
317 |
318 | [[package]]
319 | name = "lz4-sys"
320 | version = "1.9.4"
321 | source = "registry+https://github.com/rust-lang/crates.io-index"
322 | checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900"
323 | dependencies = [
324 | "cc",
325 | "libc",
326 | ]
327 |
328 | [[package]]
329 | name = "matches"
330 | version = "0.1.9"
331 | source = "registry+https://github.com/rust-lang/crates.io-index"
332 | checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
333 |
334 | [[package]]
335 | name = "memchr"
336 | version = "2.4.1"
337 | source = "registry+https://github.com/rust-lang/crates.io-index"
338 | checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
339 |
340 | [[package]]
341 | name = "mio"
342 | version = "0.7.14"
343 | source = "registry+https://github.com/rust-lang/crates.io-index"
344 | checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc"
345 | dependencies = [
346 | "libc",
347 | "log",
348 | "miow",
349 | "ntapi",
350 | "winapi",
351 | ]
352 |
353 | [[package]]
354 | name = "miow"
355 | version = "0.3.7"
356 | source = "registry+https://github.com/rust-lang/crates.io-index"
357 | checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21"
358 | dependencies = [
359 | "winapi",
360 | ]
361 |
362 | [[package]]
363 | name = "ntapi"
364 | version = "0.3.6"
365 | source = "registry+https://github.com/rust-lang/crates.io-index"
366 | checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44"
367 | dependencies = [
368 | "winapi",
369 | ]
370 |
371 | [[package]]
372 | name = "num_cpus"
373 | version = "1.13.1"
374 | source = "registry+https://github.com/rust-lang/crates.io-index"
375 | checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
376 | dependencies = [
377 | "hermit-abi",
378 | "libc",
379 | ]
380 |
381 | [[package]]
382 | name = "once_cell"
383 | version = "1.9.0"
384 | source = "registry+https://github.com/rust-lang/crates.io-index"
385 | checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5"
386 |
387 | [[package]]
388 | name = "parking_lot"
389 | version = "0.11.2"
390 | source = "registry+https://github.com/rust-lang/crates.io-index"
391 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
392 | dependencies = [
393 | "instant",
394 | "lock_api",
395 | "parking_lot_core",
396 | ]
397 |
398 | [[package]]
399 | name = "parking_lot_core"
400 | version = "0.8.5"
401 | source = "registry+https://github.com/rust-lang/crates.io-index"
402 | checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216"
403 | dependencies = [
404 | "cfg-if",
405 | "instant",
406 | "libc",
407 | "redox_syscall",
408 | "smallvec",
409 | "winapi",
410 | ]
411 |
412 | [[package]]
413 | name = "percent-encoding"
414 | version = "2.1.0"
415 | source = "registry+https://github.com/rust-lang/crates.io-index"
416 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
417 |
418 | [[package]]
419 | name = "pin-project-lite"
420 | version = "0.2.7"
421 | source = "registry+https://github.com/rust-lang/crates.io-index"
422 | checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443"
423 |
424 | [[package]]
425 | name = "pin-utils"
426 | version = "0.1.0"
427 | source = "registry+https://github.com/rust-lang/crates.io-index"
428 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
429 |
430 | [[package]]
431 | name = "proc-macro2"
432 | version = "1.0.33"
433 | source = "registry+https://github.com/rust-lang/crates.io-index"
434 | checksum = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a"
435 | dependencies = [
436 | "unicode-xid",
437 | ]
438 |
439 | [[package]]
440 | name = "quote"
441 | version = "1.0.10"
442 | source = "registry+https://github.com/rust-lang/crates.io-index"
443 | checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
444 | dependencies = [
445 | "proc-macro2",
446 | ]
447 |
448 | [[package]]
449 | name = "redox_syscall"
450 | version = "0.2.10"
451 | source = "registry+https://github.com/rust-lang/crates.io-index"
452 | checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff"
453 | dependencies = [
454 | "bitflags",
455 | ]
456 |
457 | [[package]]
458 | name = "scopeguard"
459 | version = "1.1.0"
460 | source = "registry+https://github.com/rust-lang/crates.io-index"
461 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
462 |
463 | [[package]]
464 | name = "serde"
465 | version = "1.0.131"
466 | source = "registry+https://github.com/rust-lang/crates.io-index"
467 | checksum = "b4ad69dfbd3e45369132cc64e6748c2d65cdfb001a2b1c232d128b4ad60561c1"
468 | dependencies = [
469 | "serde_derive",
470 | ]
471 |
472 | [[package]]
473 | name = "serde_derive"
474 | version = "1.0.131"
475 | source = "registry+https://github.com/rust-lang/crates.io-index"
476 | checksum = "b710a83c4e0dff6a3d511946b95274ad9ca9e5d3ae497b63fda866ac955358d2"
477 | dependencies = [
478 | "proc-macro2",
479 | "quote",
480 | "syn",
481 | ]
482 |
483 | [[package]]
484 | name = "serde_derive_internals"
485 | version = "0.26.0"
486 | source = "registry+https://github.com/rust-lang/crates.io-index"
487 | checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c"
488 | dependencies = [
489 | "proc-macro2",
490 | "quote",
491 | "syn",
492 | ]
493 |
494 | [[package]]
495 | name = "signal-hook-registry"
496 | version = "1.4.0"
497 | source = "registry+https://github.com/rust-lang/crates.io-index"
498 | checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"
499 | dependencies = [
500 | "libc",
501 | ]
502 |
503 | [[package]]
504 | name = "slab"
505 | version = "0.4.5"
506 | source = "registry+https://github.com/rust-lang/crates.io-index"
507 | checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"
508 |
509 | [[package]]
510 | name = "smallvec"
511 | version = "1.7.0"
512 | source = "registry+https://github.com/rust-lang/crates.io-index"
513 | checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309"
514 |
515 | [[package]]
516 | name = "socket2"
517 | version = "0.4.2"
518 | source = "registry+https://github.com/rust-lang/crates.io-index"
519 | checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516"
520 | dependencies = [
521 | "libc",
522 | "winapi",
523 | ]
524 |
525 | [[package]]
526 | name = "static_assertions"
527 | version = "1.1.0"
528 | source = "registry+https://github.com/rust-lang/crates.io-index"
529 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
530 |
531 | [[package]]
532 | name = "syn"
533 | version = "1.0.82"
534 | source = "registry+https://github.com/rust-lang/crates.io-index"
535 | checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59"
536 | dependencies = [
537 | "proc-macro2",
538 | "quote",
539 | "unicode-xid",
540 | ]
541 |
542 | [[package]]
543 | name = "thiserror"
544 | version = "1.0.30"
545 | source = "registry+https://github.com/rust-lang/crates.io-index"
546 | checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
547 | dependencies = [
548 | "thiserror-impl",
549 | ]
550 |
551 | [[package]]
552 | name = "thiserror-impl"
553 | version = "1.0.30"
554 | source = "registry+https://github.com/rust-lang/crates.io-index"
555 | checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
556 | dependencies = [
557 | "proc-macro2",
558 | "quote",
559 | "syn",
560 | ]
561 |
562 | [[package]]
563 | name = "tinyvec"
564 | version = "1.5.1"
565 | source = "registry+https://github.com/rust-lang/crates.io-index"
566 | checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2"
567 | dependencies = [
568 | "tinyvec_macros",
569 | ]
570 |
571 | [[package]]
572 | name = "tinyvec_macros"
573 | version = "0.1.0"
574 | source = "registry+https://github.com/rust-lang/crates.io-index"
575 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
576 |
577 | [[package]]
578 | name = "tokio"
579 | version = "1.14.0"
580 | source = "registry+https://github.com/rust-lang/crates.io-index"
581 | checksum = "70e992e41e0d2fb9f755b37446f20900f64446ef54874f40a60c78f021ac6144"
582 | dependencies = [
583 | "autocfg",
584 | "bytes",
585 | "libc",
586 | "memchr",
587 | "mio",
588 | "num_cpus",
589 | "once_cell",
590 | "parking_lot",
591 | "pin-project-lite",
592 | "signal-hook-registry",
593 | "tokio-macros",
594 | "winapi",
595 | ]
596 |
597 | [[package]]
598 | name = "tokio-macros"
599 | version = "1.6.0"
600 | source = "registry+https://github.com/rust-lang/crates.io-index"
601 | checksum = "c9efc1aba077437943f7515666aa2b882dfabfbfdf89c819ea75a8d6e9eaba5e"
602 | dependencies = [
603 | "proc-macro2",
604 | "quote",
605 | "syn",
606 | ]
607 |
608 | [[package]]
609 | name = "tower-service"
610 | version = "0.3.1"
611 | source = "registry+https://github.com/rust-lang/crates.io-index"
612 | checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"
613 |
614 | [[package]]
615 | name = "tracing"
616 | version = "0.1.29"
617 | source = "registry+https://github.com/rust-lang/crates.io-index"
618 | checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105"
619 | dependencies = [
620 | "cfg-if",
621 | "pin-project-lite",
622 | "tracing-core",
623 | ]
624 |
625 | [[package]]
626 | name = "tracing-core"
627 | version = "0.1.21"
628 | source = "registry+https://github.com/rust-lang/crates.io-index"
629 | checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4"
630 | dependencies = [
631 | "lazy_static",
632 | ]
633 |
634 | [[package]]
635 | name = "try-lock"
636 | version = "0.2.3"
637 | source = "registry+https://github.com/rust-lang/crates.io-index"
638 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
639 |
640 | [[package]]
641 | name = "unicode-bidi"
642 | version = "0.3.7"
643 | source = "registry+https://github.com/rust-lang/crates.io-index"
644 | checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f"
645 |
646 | [[package]]
647 | name = "unicode-normalization"
648 | version = "0.1.19"
649 | source = "registry+https://github.com/rust-lang/crates.io-index"
650 | checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9"
651 | dependencies = [
652 | "tinyvec",
653 | ]
654 |
655 | [[package]]
656 | name = "unicode-xid"
657 | version = "0.2.2"
658 | source = "registry+https://github.com/rust-lang/crates.io-index"
659 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
660 |
661 | [[package]]
662 | name = "url"
663 | version = "2.2.2"
664 | source = "registry+https://github.com/rust-lang/crates.io-index"
665 | checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"
666 | dependencies = [
667 | "form_urlencoded",
668 | "idna",
669 | "matches",
670 | "percent-encoding",
671 | ]
672 |
673 | [[package]]
674 | name = "want"
675 | version = "0.3.0"
676 | source = "registry+https://github.com/rust-lang/crates.io-index"
677 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
678 | dependencies = [
679 | "log",
680 | "try-lock",
681 | ]
682 |
683 | [[package]]
684 | name = "winapi"
685 | version = "0.3.9"
686 | source = "registry+https://github.com/rust-lang/crates.io-index"
687 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
688 | dependencies = [
689 | "winapi-i686-pc-windows-gnu",
690 | "winapi-x86_64-pc-windows-gnu",
691 | ]
692 |
693 | [[package]]
694 | name = "winapi-i686-pc-windows-gnu"
695 | version = "0.4.0"
696 | source = "registry+https://github.com/rust-lang/crates.io-index"
697 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
698 |
699 | [[package]]
700 | name = "winapi-x86_64-pc-windows-gnu"
701 | version = "0.4.0"
702 | source = "registry+https://github.com/rust-lang/crates.io-index"
703 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
704 |
--------------------------------------------------------------------------------
/ch-bench-rust-http/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "ch-bench-rust-http"
3 | version = "0.1.0"
4 | edition = "2018"
5 |
6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7 |
8 | [dependencies]
9 | clickhouse = "0.9"
10 | tokio = { version = "1.14.0", features = ["full"] }
11 | serde = { version = "1.0", features = ["derive"] }
12 |
13 | [dev-dependencies]
14 | clickhouse = { version = "0.9", features = ["test-util"] }
15 |
16 | [profile.release-adjusted]
17 | inherits = "release"
18 | lto = true
19 | codegen-units = 1
20 |
--------------------------------------------------------------------------------
/ch-bench-rust-http/src/main.rs:
--------------------------------------------------------------------------------
1 | use serde::{Deserialize};
2 |
3 | use clickhouse::{error::Result, Client, Row};
4 |
5 | #[derive(Row, Deserialize)]
6 | struct Data {
7 | no: u64,
8 | }
9 |
10 | #[tokio::main]
11 | async fn main() -> Result<()> {
12 | let client = Client::default()
13 | .with_url("http://localhost:8123");
14 |
15 | let mut cursor = client
16 | .query("SELECT number FROM system.numbers_mt LIMIT 500000000")
17 | .fetch::()?;
18 |
19 | while let Some(_row) = cursor.next().await? {}
20 |
21 | Ok(())
22 | }
23 |
--------------------------------------------------------------------------------
/ch-bench-rust/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 |
--------------------------------------------------------------------------------
/ch-bench-rust/Cargo.lock:
--------------------------------------------------------------------------------
1 | # This file is automatically @generated by Cargo.
2 | # It is not intended for manual editing.
3 | version = 3
4 |
5 | [[package]]
6 | name = "autocfg"
7 | version = "1.1.0"
8 | source = "registry+https://github.com/rust-lang/crates.io-index"
9 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
10 |
11 | [[package]]
12 | name = "bitflags"
13 | version = "1.3.2"
14 | source = "registry+https://github.com/rust-lang/crates.io-index"
15 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
16 |
17 | [[package]]
18 | name = "byteorder"
19 | version = "1.4.3"
20 | source = "registry+https://github.com/rust-lang/crates.io-index"
21 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
22 |
23 | [[package]]
24 | name = "bytes"
25 | version = "1.1.0"
26 | source = "registry+https://github.com/rust-lang/crates.io-index"
27 | checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8"
28 |
29 | [[package]]
30 | name = "cc"
31 | version = "1.0.72"
32 | source = "registry+https://github.com/rust-lang/crates.io-index"
33 | checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee"
34 |
35 | [[package]]
36 | name = "cfg-if"
37 | version = "1.0.0"
38 | source = "registry+https://github.com/rust-lang/crates.io-index"
39 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
40 |
41 | [[package]]
42 | name = "ch-bench-rust"
43 | version = "0.1.0"
44 | dependencies = [
45 | "clickhouse-rs",
46 | "futures",
47 | "futures-util",
48 | "tokio",
49 | ]
50 |
51 | [[package]]
52 | name = "chrono"
53 | version = "0.4.19"
54 | source = "registry+https://github.com/rust-lang/crates.io-index"
55 | checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
56 | dependencies = [
57 | "libc",
58 | "num-integer",
59 | "num-traits",
60 | "time",
61 | "winapi",
62 | ]
63 |
64 | [[package]]
65 | name = "chrono-tz"
66 | version = "0.5.3"
67 | source = "registry+https://github.com/rust-lang/crates.io-index"
68 | checksum = "2554a3155fec064362507487171dcc4edc3df60cb10f3a1fb10ed8094822b120"
69 | dependencies = [
70 | "chrono",
71 | "parse-zoneinfo",
72 | ]
73 |
74 | [[package]]
75 | name = "clickhouse-rs"
76 | version = "1.0.0-alpha.1"
77 | source = "registry+https://github.com/rust-lang/crates.io-index"
78 | checksum = "41edeaeac73a2f3c39357e5dd42a08c2d41fbc5b85c35a76879dc10d87128010"
79 | dependencies = [
80 | "byteorder",
81 | "chrono",
82 | "chrono-tz",
83 | "clickhouse-rs-cityhash-sys",
84 | "combine",
85 | "crossbeam",
86 | "futures-core",
87 | "futures-sink",
88 | "futures-util",
89 | "hostname",
90 | "lazy_static",
91 | "log",
92 | "lz4",
93 | "pin-project",
94 | "thiserror",
95 | "tokio",
96 | "url",
97 | "uuid",
98 | ]
99 |
100 | [[package]]
101 | name = "clickhouse-rs-cityhash-sys"
102 | version = "0.1.2"
103 | source = "registry+https://github.com/rust-lang/crates.io-index"
104 | checksum = "4baf9d4700a28d6cb600e17ed6ae2b43298a5245f1f76b4eab63027ebfd592b9"
105 | dependencies = [
106 | "cc",
107 | ]
108 |
109 | [[package]]
110 | name = "combine"
111 | version = "4.6.2"
112 | source = "registry+https://github.com/rust-lang/crates.io-index"
113 | checksum = "b2b2f5d0ee456f3928812dfc8c6d9a1d592b98678f6d56db9b0cd2b7bc6c8db5"
114 | dependencies = [
115 | "bytes",
116 | "memchr",
117 | ]
118 |
119 | [[package]]
120 | name = "crossbeam"
121 | version = "0.8.1"
122 | source = "registry+https://github.com/rust-lang/crates.io-index"
123 | checksum = "4ae5588f6b3c3cb05239e90bd110f257254aecd01e4635400391aeae07497845"
124 | dependencies = [
125 | "cfg-if",
126 | "crossbeam-channel",
127 | "crossbeam-deque",
128 | "crossbeam-epoch",
129 | "crossbeam-queue",
130 | "crossbeam-utils",
131 | ]
132 |
133 | [[package]]
134 | name = "crossbeam-channel"
135 | version = "0.5.1"
136 | source = "registry+https://github.com/rust-lang/crates.io-index"
137 | checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4"
138 | dependencies = [
139 | "cfg-if",
140 | "crossbeam-utils",
141 | ]
142 |
143 | [[package]]
144 | name = "crossbeam-deque"
145 | version = "0.8.1"
146 | source = "registry+https://github.com/rust-lang/crates.io-index"
147 | checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e"
148 | dependencies = [
149 | "cfg-if",
150 | "crossbeam-epoch",
151 | "crossbeam-utils",
152 | ]
153 |
154 | [[package]]
155 | name = "crossbeam-epoch"
156 | version = "0.9.5"
157 | source = "registry+https://github.com/rust-lang/crates.io-index"
158 | checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd"
159 | dependencies = [
160 | "cfg-if",
161 | "crossbeam-utils",
162 | "lazy_static",
163 | "memoffset",
164 | "scopeguard",
165 | ]
166 |
167 | [[package]]
168 | name = "crossbeam-queue"
169 | version = "0.3.2"
170 | source = "registry+https://github.com/rust-lang/crates.io-index"
171 | checksum = "9b10ddc024425c88c2ad148c1b0fd53f4c6d38db9697c9f1588381212fa657c9"
172 | dependencies = [
173 | "cfg-if",
174 | "crossbeam-utils",
175 | ]
176 |
177 | [[package]]
178 | name = "crossbeam-utils"
179 | version = "0.8.8"
180 | source = "registry+https://github.com/rust-lang/crates.io-index"
181 | checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38"
182 | dependencies = [
183 | "cfg-if",
184 | "lazy_static",
185 | ]
186 |
187 | [[package]]
188 | name = "form_urlencoded"
189 | version = "1.0.1"
190 | source = "registry+https://github.com/rust-lang/crates.io-index"
191 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191"
192 | dependencies = [
193 | "matches",
194 | "percent-encoding",
195 | ]
196 |
197 | [[package]]
198 | name = "futures"
199 | version = "0.3.18"
200 | source = "registry+https://github.com/rust-lang/crates.io-index"
201 | checksum = "8cd0210d8c325c245ff06fd95a3b13689a1a276ac8cfa8e8720cb840bfb84b9e"
202 | dependencies = [
203 | "futures-channel",
204 | "futures-core",
205 | "futures-executor",
206 | "futures-io",
207 | "futures-sink",
208 | "futures-task",
209 | "futures-util",
210 | ]
211 |
212 | [[package]]
213 | name = "futures-channel"
214 | version = "0.3.18"
215 | source = "registry+https://github.com/rust-lang/crates.io-index"
216 | checksum = "7fc8cd39e3dbf865f7340dce6a2d401d24fd37c6fe6c4f0ee0de8bfca2252d27"
217 | dependencies = [
218 | "futures-core",
219 | "futures-sink",
220 | ]
221 |
222 | [[package]]
223 | name = "futures-core"
224 | version = "0.3.18"
225 | source = "registry+https://github.com/rust-lang/crates.io-index"
226 | checksum = "629316e42fe7c2a0b9a65b47d159ceaa5453ab14e8f0a3c5eedbb8cd55b4a445"
227 |
228 | [[package]]
229 | name = "futures-executor"
230 | version = "0.3.18"
231 | source = "registry+https://github.com/rust-lang/crates.io-index"
232 | checksum = "7b808bf53348a36cab739d7e04755909b9fcaaa69b7d7e588b37b6ec62704c97"
233 | dependencies = [
234 | "futures-core",
235 | "futures-task",
236 | "futures-util",
237 | ]
238 |
239 | [[package]]
240 | name = "futures-io"
241 | version = "0.3.18"
242 | source = "registry+https://github.com/rust-lang/crates.io-index"
243 | checksum = "e481354db6b5c353246ccf6a728b0c5511d752c08da7260546fc0933869daa11"
244 |
245 | [[package]]
246 | name = "futures-macro"
247 | version = "0.3.18"
248 | source = "registry+https://github.com/rust-lang/crates.io-index"
249 | checksum = "a89f17b21645bc4ed773c69af9c9a0effd4a3f1a3876eadd453469f8854e7fdd"
250 | dependencies = [
251 | "proc-macro2",
252 | "quote",
253 | "syn",
254 | ]
255 |
256 | [[package]]
257 | name = "futures-sink"
258 | version = "0.3.18"
259 | source = "registry+https://github.com/rust-lang/crates.io-index"
260 | checksum = "996c6442437b62d21a32cd9906f9c41e7dc1e19a9579843fad948696769305af"
261 |
262 | [[package]]
263 | name = "futures-task"
264 | version = "0.3.18"
265 | source = "registry+https://github.com/rust-lang/crates.io-index"
266 | checksum = "dabf1872aaab32c886832f2276d2f5399887e2bd613698a02359e4ea83f8de12"
267 |
268 | [[package]]
269 | name = "futures-util"
270 | version = "0.3.18"
271 | source = "registry+https://github.com/rust-lang/crates.io-index"
272 | checksum = "41d22213122356472061ac0f1ab2cee28d2bac8491410fd68c2af53d1cedb83e"
273 | dependencies = [
274 | "futures-channel",
275 | "futures-core",
276 | "futures-io",
277 | "futures-macro",
278 | "futures-sink",
279 | "futures-task",
280 | "memchr",
281 | "pin-project-lite",
282 | "pin-utils",
283 | "slab",
284 | ]
285 |
286 | [[package]]
287 | name = "hermit-abi"
288 | version = "0.1.19"
289 | source = "registry+https://github.com/rust-lang/crates.io-index"
290 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
291 | dependencies = [
292 | "libc",
293 | ]
294 |
295 | [[package]]
296 | name = "hostname"
297 | version = "0.3.1"
298 | source = "registry+https://github.com/rust-lang/crates.io-index"
299 | checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
300 | dependencies = [
301 | "libc",
302 | "match_cfg",
303 | "winapi",
304 | ]
305 |
306 | [[package]]
307 | name = "idna"
308 | version = "0.2.3"
309 | source = "registry+https://github.com/rust-lang/crates.io-index"
310 | checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8"
311 | dependencies = [
312 | "matches",
313 | "unicode-bidi",
314 | "unicode-normalization",
315 | ]
316 |
317 | [[package]]
318 | name = "lazy_static"
319 | version = "1.4.0"
320 | source = "registry+https://github.com/rust-lang/crates.io-index"
321 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
322 |
323 | [[package]]
324 | name = "libc"
325 | version = "0.2.139"
326 | source = "registry+https://github.com/rust-lang/crates.io-index"
327 | checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
328 |
329 | [[package]]
330 | name = "lock_api"
331 | version = "0.4.9"
332 | source = "registry+https://github.com/rust-lang/crates.io-index"
333 | checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
334 | dependencies = [
335 | "autocfg",
336 | "scopeguard",
337 | ]
338 |
339 | [[package]]
340 | name = "log"
341 | version = "0.4.14"
342 | source = "registry+https://github.com/rust-lang/crates.io-index"
343 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
344 | dependencies = [
345 | "cfg-if",
346 | "serde",
347 | ]
348 |
349 | [[package]]
350 | name = "lz4"
351 | version = "1.23.2"
352 | source = "registry+https://github.com/rust-lang/crates.io-index"
353 | checksum = "aac20ed6991e01bf6a2e68cc73df2b389707403662a8ba89f68511fb340f724c"
354 | dependencies = [
355 | "libc",
356 | "lz4-sys",
357 | ]
358 |
359 | [[package]]
360 | name = "lz4-sys"
361 | version = "1.9.4"
362 | source = "registry+https://github.com/rust-lang/crates.io-index"
363 | checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900"
364 | dependencies = [
365 | "cc",
366 | "libc",
367 | ]
368 |
369 | [[package]]
370 | name = "match_cfg"
371 | version = "0.1.0"
372 | source = "registry+https://github.com/rust-lang/crates.io-index"
373 | checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
374 |
375 | [[package]]
376 | name = "matches"
377 | version = "0.1.9"
378 | source = "registry+https://github.com/rust-lang/crates.io-index"
379 | checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
380 |
381 | [[package]]
382 | name = "memchr"
383 | version = "2.4.1"
384 | source = "registry+https://github.com/rust-lang/crates.io-index"
385 | checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a"
386 |
387 | [[package]]
388 | name = "memoffset"
389 | version = "0.6.5"
390 | source = "registry+https://github.com/rust-lang/crates.io-index"
391 | checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
392 | dependencies = [
393 | "autocfg",
394 | ]
395 |
396 | [[package]]
397 | name = "mio"
398 | version = "0.8.5"
399 | source = "registry+https://github.com/rust-lang/crates.io-index"
400 | checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de"
401 | dependencies = [
402 | "libc",
403 | "log",
404 | "wasi 0.11.0+wasi-snapshot-preview1",
405 | "windows-sys 0.42.0",
406 | ]
407 |
408 | [[package]]
409 | name = "num-integer"
410 | version = "0.1.44"
411 | source = "registry+https://github.com/rust-lang/crates.io-index"
412 | checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
413 | dependencies = [
414 | "autocfg",
415 | "num-traits",
416 | ]
417 |
418 | [[package]]
419 | name = "num-traits"
420 | version = "0.2.14"
421 | source = "registry+https://github.com/rust-lang/crates.io-index"
422 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
423 | dependencies = [
424 | "autocfg",
425 | ]
426 |
427 | [[package]]
428 | name = "num_cpus"
429 | version = "1.13.0"
430 | source = "registry+https://github.com/rust-lang/crates.io-index"
431 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
432 | dependencies = [
433 | "hermit-abi",
434 | "libc",
435 | ]
436 |
437 | [[package]]
438 | name = "parking_lot"
439 | version = "0.12.1"
440 | source = "registry+https://github.com/rust-lang/crates.io-index"
441 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
442 | dependencies = [
443 | "lock_api",
444 | "parking_lot_core",
445 | ]
446 |
447 | [[package]]
448 | name = "parking_lot_core"
449 | version = "0.9.7"
450 | source = "registry+https://github.com/rust-lang/crates.io-index"
451 | checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521"
452 | dependencies = [
453 | "cfg-if",
454 | "libc",
455 | "redox_syscall",
456 | "smallvec",
457 | "windows-sys 0.45.0",
458 | ]
459 |
460 | [[package]]
461 | name = "parse-zoneinfo"
462 | version = "0.3.0"
463 | source = "registry+https://github.com/rust-lang/crates.io-index"
464 | checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41"
465 | dependencies = [
466 | "regex",
467 | ]
468 |
469 | [[package]]
470 | name = "percent-encoding"
471 | version = "2.1.0"
472 | source = "registry+https://github.com/rust-lang/crates.io-index"
473 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e"
474 |
475 | [[package]]
476 | name = "pin-project"
477 | version = "1.0.8"
478 | source = "registry+https://github.com/rust-lang/crates.io-index"
479 | checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08"
480 | dependencies = [
481 | "pin-project-internal",
482 | ]
483 |
484 | [[package]]
485 | name = "pin-project-internal"
486 | version = "1.0.8"
487 | source = "registry+https://github.com/rust-lang/crates.io-index"
488 | checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389"
489 | dependencies = [
490 | "proc-macro2",
491 | "quote",
492 | "syn",
493 | ]
494 |
495 | [[package]]
496 | name = "pin-project-lite"
497 | version = "0.2.7"
498 | source = "registry+https://github.com/rust-lang/crates.io-index"
499 | checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443"
500 |
501 | [[package]]
502 | name = "pin-utils"
503 | version = "0.1.0"
504 | source = "registry+https://github.com/rust-lang/crates.io-index"
505 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
506 |
507 | [[package]]
508 | name = "proc-macro2"
509 | version = "1.0.33"
510 | source = "registry+https://github.com/rust-lang/crates.io-index"
511 | checksum = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a"
512 | dependencies = [
513 | "unicode-xid",
514 | ]
515 |
516 | [[package]]
517 | name = "quote"
518 | version = "1.0.10"
519 | source = "registry+https://github.com/rust-lang/crates.io-index"
520 | checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
521 | dependencies = [
522 | "proc-macro2",
523 | ]
524 |
525 | [[package]]
526 | name = "redox_syscall"
527 | version = "0.2.10"
528 | source = "registry+https://github.com/rust-lang/crates.io-index"
529 | checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff"
530 | dependencies = [
531 | "bitflags",
532 | ]
533 |
534 | [[package]]
535 | name = "regex"
536 | version = "1.5.6"
537 | source = "registry+https://github.com/rust-lang/crates.io-index"
538 | checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1"
539 | dependencies = [
540 | "regex-syntax",
541 | ]
542 |
543 | [[package]]
544 | name = "regex-syntax"
545 | version = "0.6.26"
546 | source = "registry+https://github.com/rust-lang/crates.io-index"
547 | checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64"
548 |
549 | [[package]]
550 | name = "scopeguard"
551 | version = "1.1.0"
552 | source = "registry+https://github.com/rust-lang/crates.io-index"
553 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
554 |
555 | [[package]]
556 | name = "serde"
557 | version = "1.0.131"
558 | source = "registry+https://github.com/rust-lang/crates.io-index"
559 | checksum = "b4ad69dfbd3e45369132cc64e6748c2d65cdfb001a2b1c232d128b4ad60561c1"
560 |
561 | [[package]]
562 | name = "signal-hook-registry"
563 | version = "1.4.0"
564 | source = "registry+https://github.com/rust-lang/crates.io-index"
565 | checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"
566 | dependencies = [
567 | "libc",
568 | ]
569 |
570 | [[package]]
571 | name = "slab"
572 | version = "0.4.5"
573 | source = "registry+https://github.com/rust-lang/crates.io-index"
574 | checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5"
575 |
576 | [[package]]
577 | name = "smallvec"
578 | version = "1.7.0"
579 | source = "registry+https://github.com/rust-lang/crates.io-index"
580 | checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309"
581 |
582 | [[package]]
583 | name = "socket2"
584 | version = "0.4.7"
585 | source = "registry+https://github.com/rust-lang/crates.io-index"
586 | checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd"
587 | dependencies = [
588 | "libc",
589 | "winapi",
590 | ]
591 |
592 | [[package]]
593 | name = "syn"
594 | version = "1.0.82"
595 | source = "registry+https://github.com/rust-lang/crates.io-index"
596 | checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59"
597 | dependencies = [
598 | "proc-macro2",
599 | "quote",
600 | "unicode-xid",
601 | ]
602 |
603 | [[package]]
604 | name = "thiserror"
605 | version = "1.0.30"
606 | source = "registry+https://github.com/rust-lang/crates.io-index"
607 | checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417"
608 | dependencies = [
609 | "thiserror-impl",
610 | ]
611 |
612 | [[package]]
613 | name = "thiserror-impl"
614 | version = "1.0.30"
615 | source = "registry+https://github.com/rust-lang/crates.io-index"
616 | checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
617 | dependencies = [
618 | "proc-macro2",
619 | "quote",
620 | "syn",
621 | ]
622 |
623 | [[package]]
624 | name = "time"
625 | version = "0.1.44"
626 | source = "registry+https://github.com/rust-lang/crates.io-index"
627 | checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
628 | dependencies = [
629 | "libc",
630 | "wasi 0.10.0+wasi-snapshot-preview1",
631 | "winapi",
632 | ]
633 |
634 | [[package]]
635 | name = "tinyvec"
636 | version = "1.5.1"
637 | source = "registry+https://github.com/rust-lang/crates.io-index"
638 | checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2"
639 | dependencies = [
640 | "tinyvec_macros",
641 | ]
642 |
643 | [[package]]
644 | name = "tinyvec_macros"
645 | version = "0.1.0"
646 | source = "registry+https://github.com/rust-lang/crates.io-index"
647 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
648 |
649 | [[package]]
650 | name = "tokio"
651 | version = "1.18.5"
652 | source = "registry+https://github.com/rust-lang/crates.io-index"
653 | checksum = "0e050c618355082ae5a89ec63bbf897225d5ffe84c7c4e036874e4d185a5044e"
654 | dependencies = [
655 | "bytes",
656 | "libc",
657 | "memchr",
658 | "mio",
659 | "num_cpus",
660 | "parking_lot",
661 | "pin-project-lite",
662 | "signal-hook-registry",
663 | "socket2",
664 | "tokio-macros",
665 | "winapi",
666 | ]
667 |
668 | [[package]]
669 | name = "tokio-macros"
670 | version = "1.8.2"
671 | source = "registry+https://github.com/rust-lang/crates.io-index"
672 | checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8"
673 | dependencies = [
674 | "proc-macro2",
675 | "quote",
676 | "syn",
677 | ]
678 |
679 | [[package]]
680 | name = "unicode-bidi"
681 | version = "0.3.7"
682 | source = "registry+https://github.com/rust-lang/crates.io-index"
683 | checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f"
684 |
685 | [[package]]
686 | name = "unicode-normalization"
687 | version = "0.1.19"
688 | source = "registry+https://github.com/rust-lang/crates.io-index"
689 | checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9"
690 | dependencies = [
691 | "tinyvec",
692 | ]
693 |
694 | [[package]]
695 | name = "unicode-xid"
696 | version = "0.2.2"
697 | source = "registry+https://github.com/rust-lang/crates.io-index"
698 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3"
699 |
700 | [[package]]
701 | name = "url"
702 | version = "2.2.2"
703 | source = "registry+https://github.com/rust-lang/crates.io-index"
704 | checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c"
705 | dependencies = [
706 | "form_urlencoded",
707 | "idna",
708 | "matches",
709 | "percent-encoding",
710 | ]
711 |
712 | [[package]]
713 | name = "uuid"
714 | version = "0.8.2"
715 | source = "registry+https://github.com/rust-lang/crates.io-index"
716 | checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
717 |
718 | [[package]]
719 | name = "wasi"
720 | version = "0.10.0+wasi-snapshot-preview1"
721 | source = "registry+https://github.com/rust-lang/crates.io-index"
722 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
723 |
724 | [[package]]
725 | name = "wasi"
726 | version = "0.11.0+wasi-snapshot-preview1"
727 | source = "registry+https://github.com/rust-lang/crates.io-index"
728 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
729 |
730 | [[package]]
731 | name = "winapi"
732 | version = "0.3.9"
733 | source = "registry+https://github.com/rust-lang/crates.io-index"
734 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
735 | dependencies = [
736 | "winapi-i686-pc-windows-gnu",
737 | "winapi-x86_64-pc-windows-gnu",
738 | ]
739 |
740 | [[package]]
741 | name = "winapi-i686-pc-windows-gnu"
742 | version = "0.4.0"
743 | source = "registry+https://github.com/rust-lang/crates.io-index"
744 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
745 |
746 | [[package]]
747 | name = "winapi-x86_64-pc-windows-gnu"
748 | version = "0.4.0"
749 | source = "registry+https://github.com/rust-lang/crates.io-index"
750 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
751 |
752 | [[package]]
753 | name = "windows-sys"
754 | version = "0.42.0"
755 | source = "registry+https://github.com/rust-lang/crates.io-index"
756 | checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
757 | dependencies = [
758 | "windows_aarch64_gnullvm",
759 | "windows_aarch64_msvc",
760 | "windows_i686_gnu",
761 | "windows_i686_msvc",
762 | "windows_x86_64_gnu",
763 | "windows_x86_64_gnullvm",
764 | "windows_x86_64_msvc",
765 | ]
766 |
767 | [[package]]
768 | name = "windows-sys"
769 | version = "0.45.0"
770 | source = "registry+https://github.com/rust-lang/crates.io-index"
771 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
772 | dependencies = [
773 | "windows-targets",
774 | ]
775 |
776 | [[package]]
777 | name = "windows-targets"
778 | version = "0.42.1"
779 | source = "registry+https://github.com/rust-lang/crates.io-index"
780 | checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7"
781 | dependencies = [
782 | "windows_aarch64_gnullvm",
783 | "windows_aarch64_msvc",
784 | "windows_i686_gnu",
785 | "windows_i686_msvc",
786 | "windows_x86_64_gnu",
787 | "windows_x86_64_gnullvm",
788 | "windows_x86_64_msvc",
789 | ]
790 |
791 | [[package]]
792 | name = "windows_aarch64_gnullvm"
793 | version = "0.42.1"
794 | source = "registry+https://github.com/rust-lang/crates.io-index"
795 | checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"
796 |
797 | [[package]]
798 | name = "windows_aarch64_msvc"
799 | version = "0.42.1"
800 | source = "registry+https://github.com/rust-lang/crates.io-index"
801 | checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
802 |
803 | [[package]]
804 | name = "windows_i686_gnu"
805 | version = "0.42.1"
806 | source = "registry+https://github.com/rust-lang/crates.io-index"
807 | checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
808 |
809 | [[package]]
810 | name = "windows_i686_msvc"
811 | version = "0.42.1"
812 | source = "registry+https://github.com/rust-lang/crates.io-index"
813 | checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
814 |
815 | [[package]]
816 | name = "windows_x86_64_gnu"
817 | version = "0.42.1"
818 | source = "registry+https://github.com/rust-lang/crates.io-index"
819 | checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"
820 |
821 | [[package]]
822 | name = "windows_x86_64_gnullvm"
823 | version = "0.42.1"
824 | source = "registry+https://github.com/rust-lang/crates.io-index"
825 | checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"
826 |
827 | [[package]]
828 | name = "windows_x86_64_msvc"
829 | version = "0.42.1"
830 | source = "registry+https://github.com/rust-lang/crates.io-index"
831 | checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
832 |
--------------------------------------------------------------------------------
/ch-bench-rust/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "ch-bench-rust"
3 | version = "0.1.0"
4 | edition = "2018"
5 |
6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7 |
8 | [dependencies]
9 | futures = "*"
10 | clickhouse-rs = "1.0.0-alpha.1"
11 | futures-util = "*"
12 | tokio = { version = "1.18.5", features = ["full"] }
13 |
14 | [profile.release-adjusted]
15 | inherits = "release"
16 | lto = true
17 | codegen-units = 1
18 |
--------------------------------------------------------------------------------
/ch-bench-rust/src/main.rs:
--------------------------------------------------------------------------------
1 | use std::{error::Error};
2 | use clickhouse_rs::{Pool};
3 | use futures_util::{TryStreamExt};
4 | use futures::future;
5 |
6 | async fn execute(database_url: String) -> Result<(), Box> {
7 | let pool = Pool::new(database_url);
8 |
9 | let mut client = pool.get_handle().await.unwrap();
10 | let mut total: u64 = 0;
11 |
12 | client.query("SELECT number FROM system.numbers_mt LIMIT 500000000")
13 | .stream_blocks()
14 | .try_for_each(|block| {
15 | total += block.row_count() as u64;
16 | future::ready(Ok(()))
17 | }).await?;
18 |
19 | println!("Rows: {}", total);
20 |
21 | Ok(())
22 | }
23 |
24 | #[tokio::main]
25 | async fn main() -> Result<(), Box> {
26 | execute("tcp://localhost:9000".to_string()).await?;
27 |
28 | Ok(())
29 | }
30 |
--------------------------------------------------------------------------------
/ch-bench-uptrace/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "context"
5 | "fmt"
6 | "os"
7 | "time"
8 |
9 | "github.com/uptrace/go-clickhouse/ch"
10 | )
11 |
12 | func run(ctx context.Context) error {
13 | db := ch.Connect(
14 | ch.WithCompression(false),
15 | ch.WithTimeout(time.Second*30),
16 | )
17 | _ = db.Ping(ctx)
18 |
19 | start := time.Now()
20 | rows, err := db.QueryContext(ctx, "SELECT number FROM system.numbers_mt LIMIT 500000000")
21 | if err != nil {
22 | return err
23 | }
24 | var count int
25 | for rows.Next() {
26 | var value uint64 // <- value is read
27 | if err := rows.Scan(&value); err != nil {
28 | return err
29 | }
30 | }
31 |
32 | fmt.Println(time.Since(start).Round(time.Millisecond), count)
33 |
34 | return nil
35 | }
36 |
37 | func main() {
38 | if err := run(context.Background()); err != nil {
39 | fmt.Fprintf(os.Stderr, "Error: %+v\n", err)
40 | os.Exit(2)
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/ch-write-bench-faster/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "context"
5 | "fmt"
6 | "io"
7 | "os"
8 | "time"
9 |
10 | "github.com/ClickHouse/ch-go"
11 | "github.com/ClickHouse/ch-go/proto"
12 | "github.com/dustin/go-humanize"
13 | "github.com/go-faster/errors"
14 | )
15 |
16 | func run(ctx context.Context) error {
17 | c, err := ch.Dial(ctx, ch.Options{
18 | Compression: ch.CompressionLZ4,
19 | })
20 | if err != nil {
21 | return errors.Wrap(err, "dial")
22 | }
23 | defer func() { _ = c.Close() }()
24 |
25 | if err := c.Do(ctx, ch.Query{
26 | Body: "CREATE TABLE IF NOT EXISTS test_table (id UInt64) ENGINE = Null",
27 | }); err != nil {
28 | return err
29 | }
30 | start := time.Now()
31 | const (
32 | totalBlocks = 5000
33 | rowsInBlock = 60_000
34 | totalRows = totalBlocks * rowsInBlock
35 | totalBytes = totalRows * (64 / 8)
36 | )
37 | var (
38 | idColumns proto.ColUInt64
39 | blocks int
40 | )
41 | for i := 0; i < rowsInBlock; i++ {
42 | idColumns = append(idColumns, 1)
43 | }
44 | if err := c.Do(ctx, ch.Query{
45 | Body: "INSERT INTO test_table VALUES",
46 | OnInput: func(ctx context.Context) error {
47 | blocks++
48 | if blocks >= totalBlocks {
49 | return io.EOF
50 | }
51 | return nil
52 | },
53 | Input: []proto.InputColumn{
54 | {Name: "id", Data: idColumns},
55 | },
56 | }); err != nil {
57 | return err
58 | }
59 | duration := time.Since(start)
60 | fmt.Println(duration.Round(time.Millisecond), totalRows, "rows",
61 | humanize.Bytes(totalBytes),
62 | humanize.Bytes(uint64(float64(totalBytes)/duration.Seconds()))+"/s",
63 | )
64 | return nil
65 | }
66 |
67 | func main() {
68 | if err := run(context.Background()); err != nil {
69 | fmt.Fprintf(os.Stderr, "Error: %+v\n", err)
70 | os.Exit(2)
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/ch-write-bench-official/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "context"
5 | "fmt"
6 | "os"
7 | "time"
8 |
9 | "github.com/ClickHouse/clickhouse-go/v2"
10 | "github.com/dustin/go-humanize"
11 | )
12 |
13 | func run(ctx context.Context) error {
14 | c, err := clickhouse.Open(&clickhouse.Options{
15 | Compression: &clickhouse.Compression{
16 | Method: clickhouse.CompressionLZ4,
17 | },
18 | Addr: []string{"127.0.0.1:9000"},
19 | Auth: clickhouse.Auth{
20 | Database: "default",
21 | Username: "default",
22 | Password: "",
23 | },
24 | })
25 | if err != nil {
26 | return err
27 | }
28 | if err := c.Exec(ctx, "CREATE TABLE IF NOT EXISTS test_table (id UInt64) ENGINE = Null"); err != nil {
29 | return err
30 | }
31 | start := time.Now()
32 | const (
33 | totalBlocks = 5000
34 | rowsInBlock = 60_000
35 | totalRows = totalBlocks * rowsInBlock
36 | totalBytes = totalRows * (64 / 8)
37 | )
38 | var (
39 | idColumns []uint64
40 | )
41 | for i := 0; i < rowsInBlock; i++ {
42 | idColumns = append(idColumns, 1)
43 | }
44 | {
45 | for i := 0; i < totalBlocks; i++ {
46 | batch, err := c.PrepareBatch(ctx, "INSERT INTO test_table VALUES")
47 | if err != nil {
48 | return err
49 | }
50 | if err := batch.Column(0).Append(idColumns); err != nil {
51 | return err
52 | }
53 | if err := batch.Send(); err != nil {
54 | return err
55 | }
56 | }
57 | }
58 |
59 | duration := time.Since(start)
60 | fmt.Println(duration.Round(time.Millisecond), totalRows, "rows",
61 | humanize.Bytes(totalBytes),
62 | humanize.Bytes(uint64(float64(totalBytes)/duration.Seconds()))+"/s",
63 | )
64 | return nil
65 | }
66 |
67 | func main() {
68 | if err := run(context.Background()); err != nil {
69 | fmt.Fprintf(os.Stderr, "Error: %+v\n", err)
70 | os.Exit(2)
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/curl/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | : ${FMT:="RowBinaryWithNamesAndTypes"}
6 | : ${SQL:="SELECT number FROM system.numbers_mt LIMIT 500000000"}
7 | : ${URL:="http://localhost:8123"}
8 |
9 | \time -v curl -s -H "X-ClickHouse-Format: $FMT" --get --data-urlencode "query=$SQL" "$URL" > /dev/null
10 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module ch-bench
2 |
3 | go 1.18
4 |
5 | require (
6 | github.com/ClickHouse/ch-go v0.44.1
7 | github.com/ClickHouse/clickhouse-go/v2 v2.1.0
8 | github.com/dustin/go-humanize v1.0.0
9 | github.com/go-faster/errors v0.6.1
10 | github.com/mailru/go-clickhouse v1.8.0
11 | github.com/uptrace/go-clickhouse v0.2.7
12 | github.com/vahid-sohrabloo/chconn v1.1.1
13 | golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
14 | )
15 |
16 | require (
17 | github.com/codemodus/kace v0.5.1 // indirect
18 | github.com/dmarkham/enumer v1.5.5 // indirect
19 | github.com/go-faster/city v1.0.1 // indirect
20 | github.com/go-logr/logr v1.2.3 // indirect
21 | github.com/go-logr/stdr v1.2.2 // indirect
22 | github.com/google/uuid v1.3.0 // indirect
23 | github.com/hashicorp/go-version v1.5.0 // indirect
24 | github.com/jinzhu/inflection v1.0.0 // indirect
25 | github.com/klauspost/compress v1.15.6 // indirect
26 | github.com/pascaldekloe/name v1.0.1 // indirect
27 | github.com/paulmach/orb v0.7.1 // indirect
28 | github.com/pierrec/lz4/v4 v4.1.15 // indirect
29 | github.com/segmentio/asm v1.2.0 // indirect
30 | github.com/shopspring/decimal v1.3.1 // indirect
31 | go.opentelemetry.io/otel v1.7.0 // indirect
32 | go.opentelemetry.io/otel/metric v0.30.0 // indirect
33 | go.opentelemetry.io/otel/trace v1.7.0 // indirect
34 | go.uber.org/atomic v1.9.0 // indirect
35 | go.uber.org/multierr v1.8.0 // indirect
36 | go.uber.org/zap v1.21.0 // indirect
37 | golang.org/x/exp v0.0.0-20220428152302-39d4317da171 // indirect
38 | golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect
39 | golang.org/x/sys v0.0.0-20220429233432-b5fbb4746d32 // indirect
40 | golang.org/x/tools v0.1.11-0.20220415161144-46bc274e027b // indirect
41 | golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
42 | )
43 |
--------------------------------------------------------------------------------
/go.sum:
--------------------------------------------------------------------------------
1 | github.com/ClickHouse/ch-go v0.44.1 h1:5VzA7XYpxPYlVs84tC4tXgDiNlrsZ0RWeXzc4Bng6PE=
2 | github.com/ClickHouse/ch-go v0.44.1/go.mod h1:ZhBrtiFlUoL0QN8jOwEbC75MIfVovlMrDcoAfLp2Uuw=
3 | github.com/ClickHouse/clickhouse-go v1.5.4/go.mod h1:EaI/sW7Azgz9UATzd5ZdZHRUhHgv5+JMS9NSr2smCJI=
4 | github.com/ClickHouse/clickhouse-go/v2 v2.1.0 h1:X53a5FzRna9TLGGYm1A7T+3kEnrfEYl15BNsL6sw81s=
5 | github.com/ClickHouse/clickhouse-go/v2 v2.1.0/go.mod h1:nOBMOlMUGQJ2eb6PtECHYldbEHmDJFzfIrtaDXMjrb4=
6 | github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
7 | github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
8 | github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
9 | github.com/bkaradzic/go-lz4 v1.0.0/go.mod h1:0YdlkowM3VswSROI7qDxhRvJ3sLhlFrRRwjwegp5jy4=
10 | github.com/bradleyjkemp/cupaloy v2.3.0+incompatible h1:UafIjBvWQmS9i/xRg+CamMrnLTKNzo+bdmT/oH34c2Y=
11 | github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80=
12 | github.com/codemodus/kace v0.5.1 h1:4OCsBlE2c/rSJo375ggfnucv9eRzge/U5LrrOZd47HA=
13 | github.com/codemodus/kace v0.5.1/go.mod h1:coddaHoX1ku1YFSe4Ip0mL9kQjJvKkzb9CfIdG1YR04=
14 | github.com/dave/astrid v0.0.0-20170323122508-8c2895878b14/go.mod h1:Sth2QfxfATb/nW4EsrSi2KyJmbcniZ8TgTaji17D6ms=
15 | github.com/dave/brenda v1.1.0/go.mod h1:4wCUr6gSlu5/1Tk7akE5X7UorwiQ8Rij0SKH3/BGMOM=
16 | github.com/dave/courtney v0.3.0/go.mod h1:BAv3hA06AYfNUjfjQr+5gc6vxeBVOupLqrColj+QSD8=
17 | github.com/dave/gopackages v0.0.0-20170318123100-46e7023ec56e/go.mod h1:i00+b/gKdIDIxuLDFob7ustLAVqhsZRk2qVZrArELGQ=
18 | github.com/dave/jennifer v1.5.0/go.mod h1:4MnyiFIlZS3l5tSDn8VnzE6ffAhYBMB2SZntBsZGUok=
19 | github.com/dave/kerr v0.0.0-20170318121727-bc25dd6abe8e/go.mod h1:qZqlPyPvfsDJt+3wHJ1EvSXDuVjFTK0j2p/ca+gtsb8=
20 | github.com/dave/patsy v0.0.0-20210517141501-957256f50cba/go.mod h1:qfR88CgEGLoiqDaE+xxDCi5QA5v4vUoW0UCX2Nd5Tlc=
21 | github.com/dave/rebecca v0.9.1/go.mod h1:N6XYdMD/OKw3lkF3ywh8Z6wPGuwNFDNtWYEMFWEmXBA=
22 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
23 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
24 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
25 | github.com/dmarkham/enumer v1.5.5 h1:LpOGL3PQTPOM87rgowZEf7Z5EmkgnKqUtS92Vo+vqzs=
26 | github.com/dmarkham/enumer v1.5.5/go.mod h1:qHwULwuCxYFAFM5KCkpF1U/U0BF5sNQKLccvUzKNY2w=
27 | github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
28 | github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
29 | github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
30 | github.com/go-faster/city v1.0.1 h1:4WAxSZ3V2Ws4QRDrscLEDcibJY8uf41H6AhXDrNDcGw=
31 | github.com/go-faster/city v1.0.1/go.mod h1:jKcUJId49qdW3L1qKHH/3wPeUstCVpVSXTM6vO3VcTw=
32 | github.com/go-faster/errors v0.6.1 h1:nNIPOBkprlKzkThvS/0YaX8Zs9KewLCOSFQS5BU06FI=
33 | github.com/go-faster/errors v0.6.1/go.mod h1:5MGV2/2T9yvlrbhe9pD9LO5Z/2zCSq2T8j+Jpi2LAyY=
34 | github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
35 | github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
36 | github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
37 | github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
38 | github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
39 | github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
40 | github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
41 | github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
42 | github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
43 | github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
44 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
45 | github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
46 | github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
47 | github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
48 | github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
49 | github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
50 | github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ=
51 | github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
52 | github.com/hashicorp/go-version v1.5.0 h1:O293SZ2Eg+AAYijkVK3jR786Am1bhDEh2GHT0tIVE5E=
53 | github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
54 | github.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
55 | github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
56 | github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
57 | github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks=
58 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
59 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
60 | github.com/klauspost/compress v1.15.6 h1:6D9PcO8QWu0JyaQ2zUMmu16T1T+zjjEpP91guRsvDfY=
61 | github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
62 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
63 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
64 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
65 | github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
66 | github.com/mailru/go-clickhouse v1.8.0 h1:wqTHVsfR4g+BSwKso7X90RdOsVXaSwqJ96GmgBPSgVA=
67 | github.com/mailru/go-clickhouse v1.8.0/go.mod h1:crHi+yrqslIClnYPm8IOxYVX6GmYVYymJ601I4jDqvo=
68 | github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
69 | github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
70 | github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
71 | github.com/mkevac/debugcharts v0.0.0-20191222103121-ae1c48aa8615/go.mod h1:Ad7oeElCZqA1Ufj0U9/liOF4BtVepxRcTvr2ey7zTvM=
72 | github.com/pascaldekloe/name v1.0.1 h1:9lnXOHeqeHHnWLbKfH6X98+4+ETVqFqxN09UXSjcMb0=
73 | github.com/pascaldekloe/name v1.0.1/go.mod h1:Z//MfYJnH4jVpQ9wkclwu2I2MkHmXTlT9wR5UZScttM=
74 | github.com/paulmach/orb v0.7.1 h1:Zha++Z5OX/l168sqHK3k4z18LDvr+YAO/VjK0ReQ9rU=
75 | github.com/paulmach/orb v0.7.1/go.mod h1:FWRlTgl88VI1RBx/MkrwWDRhQ96ctqMCh8boXhmqB/A=
76 | github.com/paulmach/protoscan v0.2.1/go.mod h1:SpcSwydNLrxUGSDvXvO0P7g7AuhJ7lcKfDlhJCDw2gY=
77 | github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
78 | github.com/pierrec/lz4/v4 v4.1.12/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
79 | github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0=
80 | github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
81 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
82 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
83 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
84 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
85 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
86 | github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
87 | github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs=
88 | github.com/shirou/gopsutil v2.19.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
89 | github.com/shirou/gopsutil v3.21.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
90 | github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc=
91 | github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8=
92 | github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
93 | github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
94 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
95 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
96 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
97 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
98 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
99 | github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s=
100 | github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
101 | github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
102 | github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ=
103 | github.com/uptrace/go-clickhouse v0.2.7 h1:GfQWNbzFLgoHgqAVlWdcHC/ZBeGRKzyc5iz/UjpTXKY=
104 | github.com/uptrace/go-clickhouse v0.2.7/go.mod h1:4x/wg7gVcIAHRM+zHhHcI/OtiC3p0yPeappWNN4MVvI=
105 | github.com/uptrace/go-clickhouse/chdebug v0.2.7 h1:CIMdiGjV9Wpgf5P03hTx2WRKoYyx8L7Nx+VET28kPb0=
106 | github.com/vahid-sohrabloo/chconn v1.1.1 h1:SbL/g+KHuwkK2oovZ47g2REOzY7Q34OJCsSGJ45CAkk=
107 | github.com/vahid-sohrabloo/chconn v1.1.1/go.mod h1:zSjg8gU3C7Ocr87Py4JKgiVOXQidWdHgiNZ+sH/lvKM=
108 | github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
109 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
110 | github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
111 | github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
112 | github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
113 | go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM=
114 | go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk=
115 | go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c=
116 | go.opentelemetry.io/otel/metric v0.30.0/go.mod h1:/ShZ7+TS4dHzDFmfi1kSXMhMVubNoP0oIaBp70J6UXU=
117 | go.opentelemetry.io/otel/sdk v1.7.0 h1:4OmStpcKVOfvDOgCt7UriAPtKolwIhxpnSNI/yK+1B0=
118 | go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o=
119 | go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU=
120 | go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
121 | go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
122 | go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
123 | go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
124 | go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
125 | go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
126 | go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8=
127 | go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
128 | go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8=
129 | go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw=
130 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
131 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
132 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
133 | golang.org/x/exp v0.0.0-20220428152302-39d4317da171 h1:TfdoLivD44QwvssI9Sv1xwa5DcL5XQr4au4sZ2F2NV4=
134 | golang.org/x/exp v0.0.0-20220428152302-39d4317da171/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE=
135 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
136 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
137 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
138 | golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
139 | golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
140 | golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o=
141 | golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
142 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
143 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
144 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
145 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
146 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
147 | golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
148 | golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
149 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
150 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
151 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
152 | golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
153 | golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
154 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
155 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
156 | golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
157 | golang.org/x/sys v0.0.0-20191220220014-0732a990476f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
158 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
159 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
160 | golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
161 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
162 | golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
163 | golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
164 | golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
165 | golang.org/x/sys v0.0.0-20220429233432-b5fbb4746d32 h1:Js08h5hqB5xyWR789+QqueR6sDE8mk+YvpETZ+F6X9Y=
166 | golang.org/x/sys v0.0.0-20220429233432-b5fbb4746d32/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
167 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
168 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
169 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
170 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
171 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
172 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
173 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
174 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
175 | golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
176 | golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
177 | golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
178 | golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
179 | golang.org/x/tools v0.1.11-0.20220415161144-46bc274e027b h1:T2uvM9Dgo1BIJReFT5FzoJkbPNS7+4LycTDAgS5lmtc=
180 | golang.org/x/tools v0.1.11-0.20220415161144-46bc274e027b/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
181 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
182 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
183 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
184 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
185 | golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f h1:GGU+dLjvlC3qDwqYgL6UgRmHXhOOgns0bZu2Ty5mm6U=
186 | golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
187 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
188 | google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
189 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
190 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
191 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
192 | gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
193 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
194 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
195 | gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
196 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
197 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
198 |
--------------------------------------------------------------------------------