mirror of
https://github.com/theoludwig/billion_row_challenge.git
synced 2024-10-29 22:18:25 +01:00
chore: initial commit
This commit is contained in:
commit
473e687be3
14
.editorconfig
Normal file
14
.editorconfig
Normal file
@ -0,0 +1,14 @@
|
||||
# https://editorconfig.org/
|
||||
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{yml,yaml,json,md}]
|
||||
indent_size = 2
|
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
* text=auto eol=lf
|
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/target
|
||||
measurements.txt
|
||||
1brc
|
7
.vscode/extensions.json
vendored
Normal file
7
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"editorconfig.editorconfig",
|
||||
"rust-lang.rust-analyzer",
|
||||
"tamasfe.even-better-toml"
|
||||
]
|
||||
}
|
16
.vscode/settings.json
vendored
Normal file
16
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"rust-analyzer.check.command": "clippy",
|
||||
"[rust]": {
|
||||
"editor.defaultFormatter": "rust-lang.rust-analyzer",
|
||||
"editor.tabSize": 4,
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[toml]": {
|
||||
"editor.defaultFormatter": "tamasfe.even-better-toml",
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll": "explicit"
|
||||
}
|
||||
}
|
169
Cargo.lock
generated
Normal file
169
Cargo.lock
generated
Normal file
@ -0,0 +1,169 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "anstyle"
|
||||
version = "1.0.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b"
|
||||
|
||||
[[package]]
|
||||
name = "assert_cmd"
|
||||
version = "2.0.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed72493ac66d5804837f480ab3766c72bdfab91a65e565fc54fa9e42db0073a8"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"bstr",
|
||||
"doc-comment",
|
||||
"predicates",
|
||||
"predicates-core",
|
||||
"predicates-tree",
|
||||
"wait-timeout",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "billion_row_challenge"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"assert_cmd",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bstr"
|
||||
version = "1.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
"regex-automata",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "difflib"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8"
|
||||
|
||||
[[package]]
|
||||
name = "doc-comment"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.155"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
||||
|
||||
[[package]]
|
||||
name = "predicates"
|
||||
version = "3.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68b87bfd4605926cdfefc1c3b5f8fe560e3feca9d5552cf68c466d3d8236c7e8"
|
||||
dependencies = [
|
||||
"anstyle",
|
||||
"difflib",
|
||||
"predicates-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "predicates-core"
|
||||
version = "1.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174"
|
||||
|
||||
[[package]]
|
||||
name = "predicates-tree"
|
||||
version = "1.0.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf"
|
||||
dependencies = [
|
||||
"predicates-core",
|
||||
"termtree",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.86"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.36"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.4.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.203"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.203"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.67"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ff8655ed1d86f3af4ee3fd3263786bc14245ad17c4c7e85ba7187fb3ae028c90"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "termtree"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76"
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
||||
|
||||
[[package]]
|
||||
name = "wait-timeout"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
10
Cargo.toml
Normal file
10
Cargo.toml
Normal file
@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "billion_row_challenge"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.79.0"
|
||||
|
||||
[dependencies]
|
||||
|
||||
[dev-dependencies]
|
||||
assert_cmd = "2.0.14"
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
# MIT License
|
||||
|
||||
Copyright (c) Théo LUDWIG <contact@theoludwig.fr>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
143
README.md
Normal file
143
README.md
Normal file
@ -0,0 +1,143 @@
|
||||
<h1 align="center">theoludwig/billion_row_challenge</h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>My Solution for the <a href="https://1brc.dev/">1 Billion Row Challenge</a>, implemented in the <a href="https://www.rust-lang.org/">Rust Programming Language</a>.</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/theoludwig/billion_row_challenge/actions/workflows/ci.yml"><img src="https://github.com/theoludwig/billion_row_challenge/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI" /></a>
|
||||
<a href="https://www.rust-lang.org/"><img src="https://img.shields.io/badge/Rust%20MSRV-v1.79.0-blue?logo=rust" alt="Rust" /></a>
|
||||
<a href="https://conventionalcommits.org"><img src="https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg" alt="Conventional Commits" /></a>
|
||||
<a href="./LICENSE"><img src="https://img.shields.io/badge/licence-MIT-blue.svg" alt="Licence MIT"/></a>
|
||||
</p>
|
||||
|
||||
## About
|
||||
|
||||
1️⃣🐝🏎️ The One Billion Row Challenge (1BRC) is a fun exploration of how far modern programming languages (initally only Java) can be pushed to **calculate** the **min, max, and average of 1 billion measurements** as fast as possible.
|
||||
|
||||
The repository contains **my solution** for the [1BRC](https://1brc.dev/) challenge, implemented in the [Rust programming language](https://www.rust-lang.org/).
|
||||
|
||||
![1BRC](../1brc.png)
|
||||
|
||||
### Links
|
||||
|
||||
- <https://github.com/gunnarmorling/1brc>
|
||||
- <https://www.morling.dev/blog/one-billion-row-challenge/>
|
||||
- <https://1brc.dev/>
|
||||
|
||||
## Getting Started
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- [Rust](https://www.rust-lang.org/) >= v1.79.0
|
||||
- [Java](https://openjdk.org/) v21 (used to generate the 1 billion row data)
|
||||
|
||||
### Installation
|
||||
|
||||
```sh
|
||||
# Clone the repository
|
||||
git clone git@github.com:theoludwig/billion_row_challenge.git
|
||||
|
||||
# Go to the project root
|
||||
cd billion_row_challenge
|
||||
|
||||
# Rust related commands
|
||||
cargo run
|
||||
cargo build --release
|
||||
cargo test
|
||||
cargo clippy --verbose -- -D warnings
|
||||
cargo fmt -- --check
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
```sh
|
||||
# Build (optimized)
|
||||
cargo build --release
|
||||
|
||||
# Usage: ./target/release/billion_row_challenge <input_file_path>
|
||||
|
||||
# Example with the tests fixture data
|
||||
./target/release/billion_row_challenge ./tests/fixtures/10/input.txt
|
||||
|
||||
# Example with the 1 billion row data (not included in the repository, needs to be generated)
|
||||
./target/release/billion_row_challenge measurements.txt
|
||||
```
|
||||
|
||||
### Generate the 1 Billion Row Data (~12GB)
|
||||
|
||||
```sh
|
||||
# Clone the 1brc repository
|
||||
git clone git@github.com:gunnarmorling/1brc.git
|
||||
|
||||
# Go to the project root
|
||||
cd 1brc
|
||||
|
||||
# Build the project using Apache Maven
|
||||
./mvnw clean verify
|
||||
|
||||
# Create the `measurements.txt` file with 1B rows
|
||||
./create_measurements.sh 1000000000
|
||||
```
|
||||
|
||||
## Challenge Instructions
|
||||
|
||||
The text file contains temperature values for a range of weather stations. Each row is one measurement in the format `<string: station name>;<double: measurement>`, with the measurement value having exactly one fractional digit. The following shows ten rows as an example:
|
||||
|
||||
```txt
|
||||
Hamburg;12.0
|
||||
Bulawayo;8.9
|
||||
Palembang;38.8
|
||||
St. John's;15.2
|
||||
Cracow;12.6
|
||||
Bridgetown;26.9
|
||||
Istanbul;6.2
|
||||
Roseau;34.4
|
||||
Conakry;31.2
|
||||
Istanbul;23.0
|
||||
```
|
||||
|
||||
The task is to write a program which reads the file, calculates the **min**, **mean**, and **max** temperature value **per weather station**, and emits the results on stdout like this (i.e. sorted alphabetically by station name, and the result values per station in the format `<min>/<mean>/<max>`, rounded to one fractional digit):
|
||||
|
||||
```txt
|
||||
{Abha=-23.0/18.0/59.2, Abidjan=-16.2/26.0/67.3, Abéché=-10.0/29.4/69.0, Accra=-10.1/26.4/66.4, Addis Ababa=-23.7/16.0/67.0, Adelaide=-27.8/17.3/58.5, ...}
|
||||
```
|
||||
|
||||
### Limits
|
||||
|
||||
- Input value ranges are as follows:
|
||||
- **Station name:** non null UTF-8 string of min length 1 character and max length 100 bytes, containing neither `;` nor `\n` characters. (i.e. this could be 100 one-byte characters, or 50 two-byte characters, etc.).
|
||||
- **Temperature value:** non null double between -99.9 (inclusive) and 99.9 (inclusive), always with one fractional digit.
|
||||
- There is a maximum of $10,000$ unique station names.
|
||||
- Line endings in the file are `\n` characters on all platforms.
|
||||
- The rounding of output values must be done using the semantics of IEEE 754 rounding-direction "roundTowardPositive".
|
||||
|
||||
### Examples
|
||||
|
||||
See the [`tests/fixtures`](./tests/fixtures) folder for examples of input/output.
|
||||
|
||||
#### Input
|
||||
|
||||
```txt
|
||||
Halifax;12.9
|
||||
Zagreb;12.2
|
||||
Cabo San Lucas;14.9
|
||||
Adelaide;15.0
|
||||
Ségou;25.7
|
||||
Pittsburgh;9.7
|
||||
Karachi;15.4
|
||||
Xi'an;24.2
|
||||
Dodoma;22.2
|
||||
Tauranga;38.2
|
||||
|
||||
```
|
||||
|
||||
#### Output
|
||||
|
||||
```txt
|
||||
{Adelaide=15.0/15.0/15.0, Cabo San Lucas=14.9/14.9/14.9, Dodoma=22.2/22.2/22.2, Halifax=12.9/12.9/12.9, Karachi=15.4/15.4/15.4, Pittsburgh=9.7/9.7/9.7, Ségou=25.7/25.7/25.7, Tauranga=38.2/38.2/38.2, Xi'an=24.2/24.2/24.2, Zagreb=12.2/12.2/12.2}
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](./LICENSE)
|
3
src/main.rs
Normal file
3
src/main.rs
Normal file
@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
}
|
1
tests/fixtures/1/input.txt
vendored
Normal file
1
tests/fixtures/1/input.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
Kunming;19.8
|
1
tests/fixtures/1/output.txt
vendored
Normal file
1
tests/fixtures/1/output.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
{Kunming=19.8/19.8/19.8}
|
10
tests/fixtures/10/input.txt
vendored
Normal file
10
tests/fixtures/10/input.txt
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
Halifax;12.9
|
||||
Zagreb;12.2
|
||||
Cabo San Lucas;14.9
|
||||
Adelaide;15.0
|
||||
Ségou;25.7
|
||||
Pittsburgh;9.7
|
||||
Karachi;15.4
|
||||
Xi'an;24.2
|
||||
Dodoma;22.2
|
||||
Tauranga;38.2
|
1
tests/fixtures/10/output.txt
vendored
Normal file
1
tests/fixtures/10/output.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
{Adelaide=15.0/15.0/15.0, Cabo San Lucas=14.9/14.9/14.9, Dodoma=22.2/22.2/22.2, Halifax=12.9/12.9/12.9, Karachi=15.4/15.4/15.4, Pittsburgh=9.7/9.7/9.7, Ségou=25.7/25.7/25.7, Tauranga=38.2/38.2/38.2, Xi'an=24.2/24.2/24.2, Zagreb=12.2/12.2/12.2}
|
10000
tests/fixtures/10000-unique-keys/input.txt
vendored
Normal file
10000
tests/fixtures/10000-unique-keys/input.txt
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
tests/fixtures/10000-unique-keys/output.txt
vendored
Normal file
1
tests/fixtures/10000-unique-keys/output.txt
vendored
Normal file
File diff suppressed because one or more lines are too long
2
tests/fixtures/2/input.txt
vendored
Normal file
2
tests/fixtures/2/input.txt
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
Bosaso;19.2
|
||||
Petropavlovsk-Kamchatsky;9.5
|
1
tests/fixtures/2/output.txt
vendored
Normal file
1
tests/fixtures/2/output.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
{Bosaso=19.2/19.2/19.2, Petropavlovsk-Kamchatsky=9.5/9.5/9.5}
|
20
tests/fixtures/20/input.txt
vendored
Normal file
20
tests/fixtures/20/input.txt
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
Odesa1️⃣🐝🏎️;6.5
|
||||
Canberra1️⃣🐝🏎️;5.2
|
||||
Lhasa1️⃣🐝🏎️;13.4
|
||||
Edinburgh1️⃣🐝🏎️;19.8
|
||||
Da Nang1️⃣🐝🏎️;33.7
|
||||
Xi'an1️⃣🐝🏎️;17.5
|
||||
Berlin1️⃣🐝🏎️;-0.3
|
||||
Tamanrasset1️⃣🐝🏎️;17.9
|
||||
Abéché1️⃣🐝🏎️;27.3
|
||||
Baghdad1️⃣🐝🏎️;26.0
|
||||
Lyon1️⃣🐝🏎️;1.8
|
||||
Mogadishu1️⃣🐝🏎️;11.5
|
||||
Bangkok1️⃣🐝🏎️;25.6
|
||||
Irkutsk1️⃣🐝🏎️;9.9
|
||||
Parakou1️⃣🐝🏎️;36.3
|
||||
Almaty1️⃣🐝🏎️;15.3
|
||||
Birao1️⃣🐝🏎️;33.5
|
||||
Chittagong1️⃣🐝🏎️;12.6
|
||||
Tirana1️⃣🐝🏎️;27.7
|
||||
Nashville1️⃣🐝🏎️;-4.9
|
1
tests/fixtures/20/output.txt
vendored
Normal file
1
tests/fixtures/20/output.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
{Abéché1️⃣🐝🏎️=27.3/27.3/27.3, Almaty1️⃣🐝🏎️=15.3/15.3/15.3, Baghdad1️⃣🐝🏎️=26.0/26.0/26.0, Bangkok1️⃣🐝🏎️=25.6/25.6/25.6, Berlin1️⃣🐝🏎️=-0.3/-0.3/-0.3, Birao1️⃣🐝🏎️=33.5/33.5/33.5, Canberra1️⃣🐝🏎️=5.2/5.2/5.2, Chittagong1️⃣🐝🏎️=12.6/12.6/12.6, Da Nang1️⃣🐝🏎️=33.7/33.7/33.7, Edinburgh1️⃣🐝🏎️=19.8/19.8/19.8, Irkutsk1️⃣🐝🏎️=9.9/9.9/9.9, Lhasa1️⃣🐝🏎️=13.4/13.4/13.4, Lyon1️⃣🐝🏎️=1.8/1.8/1.8, Mogadishu1️⃣🐝🏎️=11.5/11.5/11.5, Nashville1️⃣🐝🏎️=-4.9/-4.9/-4.9, Odesa1️⃣🐝🏎️=6.5/6.5/6.5, Parakou1️⃣🐝🏎️=36.3/36.3/36.3, Tamanrasset1️⃣🐝🏎️=17.9/17.9/17.9, Tirana1️⃣🐝🏎️=27.7/27.7/27.7, Xi'an1️⃣🐝🏎️=17.5/17.5/17.5}
|
6
tests/fixtures/3/input.txt
vendored
Normal file
6
tests/fixtures/3/input.txt
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
Bosaso;5.0
|
||||
Bosaso;20.0
|
||||
Bosaso;-5.0
|
||||
Bosaso;-15.0
|
||||
Petropavlovsk-Kamchatsky;9.5
|
||||
Petropavlovsk-Kamchatsky;-9.5
|
1
tests/fixtures/3/output.txt
vendored
Normal file
1
tests/fixtures/3/output.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
{Bosaso=-15.0/1.3/20.0, Petropavlovsk-Kamchatsky=-9.5/0.0/9.5}
|
2
tests/fixtures/boundaries/input.txt
vendored
Normal file
2
tests/fixtures/boundaries/input.txt
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
Bosaso;-99.9
|
||||
Petropavlovsk-Kamchatsky;99.9
|
1
tests/fixtures/boundaries/output.txt
vendored
Normal file
1
tests/fixtures/boundaries/output.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
{Bosaso=-99.9/-99.9/-99.9, Petropavlovsk-Kamchatsky=99.9/99.9/99.9}
|
46
tests/fixtures/complex-utf8/input.txt
vendored
Normal file
46
tests/fixtures/complex-utf8/input.txt
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
aniCartagoEṭ ṬīraTemerinCormeilles-en-ParisisZawyat ech CheïkhS;25.4
|
||||
picuíbaJhang CityTepicJayapuraRio BrancoToyamaFangtingSanandajDelhi CantonmentLinghaiShorāpurToy;13.0
|
||||
lhuleuTacurongNavapolatskPiscoDera Ismail KhanLabéAltamiraCavite CityYevpatoriiaTait;22.8
|
||||
āng;15.7
|
||||
hanVarkkallaiPort LokoD;10.9
|
||||
eLafayetteAsh Shaţ;14.2
|
||||
‘AqabahPembaNowgongQu;12.9
|
||||
inhoSökeDordrechtPoáLaloG;13.1
|
||||
skişeh;12.9
|
||||
rhamDera Ghazi KhanMiyazakiBhātpār;21.3
|
||||
igButeboJuršinciKoaniImdinaNova VasDestrnikVarvarinSkopunGornji PetrovciRibnicaKon TumŠavnikPodl;11.5
|
||||
igButeboJuršinciKoaniImdinaNova VasDestrnikVarvarinSkopunGornji PetrovciRibnicaKon TumŠavnikPoul;18.5
|
||||
igButeboJuršinciKoaniImdinaNova VasDestrnikVarvarinSkomunGornji PetrovciRibnicaKon TumŠavnikPoul;22.5
|
||||
ixButeboJuršinciKoaniImdinaNova VasDestrnikVarvarinSkomunGornji PetrovciRibnicaKon TumŠavnikPoul;0.1
|
||||
B;8.9
|
||||
C;38.9
|
||||
nt-A;9.2
|
||||
y-le-MoutierSant’ArpinoPljevljaRo;0.8
|
||||
oGumlāSamā’;14.9
|
||||
os Reyes de SalgadoCinisello BalsamoKashibaH;20.0
|
||||
m el Bo;14.6
|
||||
mazunchaleZrenjaninFouchanaSurtPanč;6.7
|
||||
ġFis;9.6
|
||||
epé;28.2
|
||||
ālSongnimSanto TomasKoiduHoshangābādOpoleNovocheboksarskArarasKhannaPunoKoforiduaAhmadpur E;19.4
|
||||
iudad Melchor MúzquizQuinhámelDa;40.5
|
||||
ChesterLobnyaSan LeandroHemeiSolweziGrand BourgKaliboS;23.4
|
||||
cotánSan Ramón de la Nueva OránWausauGbaweTailaiRochester HillsVilla ElisaToba TekS;11.2
|
||||
raKielSibuYatoParanáSanta ClaraYamagataKatihārBeykozImperat;13.5
|
||||
l ‘;14.6
|
||||
TanjungpinangKasselHaldiaLuxorLạng SơnAt TājīTaraka;10.6
|
||||
MirnaPehčevoRopažiGus;16.7
|
||||
üSosnowiecTanauanMya;18.4
|
||||
ngoDübendorfC;11.7
|
||||
liLoretoPlacentiaAliso ViejoChomaPen-y-Bont ar OgwrCojutepeque;12.4
|
||||
burgazAl ḨawīyahSalamancaMbanza KongoNchelengeZhangaözenTurbatMatiMangghystaūMalak;21.5
|
||||
iCoahuitlánRabatJahāngīrpur SālkhaniCamUniversity of California-Santa BarbaraSerravalleTelkathuM;13.4
|
||||
lioúpoliBarahonaHoPhuketLe BardoBuena ParkKayesChampigny-sur-MarneHaskovoChathamBatleyEsteioRe;22.5
|
||||
PototanSahuayo de MorelosBambergMosigkauFrancisco BeltrãoJelenia GóraTelêmaco Borb;17.5
|
||||
CabindaKermānZunhuaRochesterValenzuelaOrūmīyehWugangShuangqiaoTshikapa;3.0
|
||||
venGaopingDunhuaAz Zarqā’SylhetKaihuaCaerdyddJāmnagarFuyuanGayaFlorianópolisC;1.9
|
||||
ntington StationKampong SpeuKakataMoschátoBressoVentspilsSaint-CloudTamboSidi Smai’ilDandenon;14.6
|
||||
rugarhVerāvalAlagoinhasEdremitBandırmaSalavatGandajikaLucapaLeesburgTamaRas Tan;10.9
|
||||
oCanagatanHelsinkiJabalpurProvidenceRuchengNizhniy NovgorodAhvāzJeparaShaoyangComayagüe;17.3
|
||||
ça PaulistaDarmstadtZhengdingPindamonhangabaEnschedeGirónUttarpāraHeidelbergK;6.0
|
||||
en IslandKota BharuCiudad López MateosCelayaVinhDuyunLos Mochis‘AjmānNyalaLarkanaWichitaNishi;11.9
|
1
tests/fixtures/complex-utf8/output.txt
vendored
Normal file
1
tests/fixtures/complex-utf8/output.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
{B=8.9/8.9/8.9, C=38.9/38.9/38.9, CabindaKermānZunhuaRochesterValenzuelaOrūmīyehWugangShuangqiaoTshikapa=3.0/3.0/3.0, ChesterLobnyaSan LeandroHemeiSolweziGrand BourgKaliboS=23.4/23.4/23.4, MirnaPehčevoRopažiGus=16.7/16.7/16.7, PototanSahuayo de MorelosBambergMosigkauFrancisco BeltrãoJelenia GóraTelêmaco Borb=17.5/17.5/17.5, TanjungpinangKasselHaldiaLuxorLạng SơnAt TājīTaraka=10.6/10.6/10.6, aniCartagoEṭ ṬīraTemerinCormeilles-en-ParisisZawyat ech CheïkhS=25.4/25.4/25.4, burgazAl ḨawīyahSalamancaMbanza KongoNchelengeZhangaözenTurbatMatiMangghystaūMalak=21.5/21.5/21.5, cotánSan Ramón de la Nueva OránWausauGbaweTailaiRochester HillsVilla ElisaToba TekS=11.2/11.2/11.2, eLafayetteAsh Shaţ=14.2/14.2/14.2, en IslandKota BharuCiudad López MateosCelayaVinhDuyunLos Mochis‘AjmānNyalaLarkanaWichitaNishi=11.9/11.9/11.9, epé=28.2/28.2/28.2, hanVarkkallaiPort LokoD=10.9/10.9/10.9, iCoahuitlánRabatJahāngīrpur SālkhaniCamUniversity of California-Santa BarbaraSerravalleTelkathuM=13.4/13.4/13.4, igButeboJuršinciKoaniImdinaNova VasDestrnikVarvarinSkomunGornji PetrovciRibnicaKon TumŠavnikPoul=22.5/22.5/22.5, igButeboJuršinciKoaniImdinaNova VasDestrnikVarvarinSkopunGornji PetrovciRibnicaKon TumŠavnikPodl=11.5/11.5/11.5, igButeboJuršinciKoaniImdinaNova VasDestrnikVarvarinSkopunGornji PetrovciRibnicaKon TumŠavnikPoul=18.5/18.5/18.5, inhoSökeDordrechtPoáLaloG=13.1/13.1/13.1, iudad Melchor MúzquizQuinhámelDa=40.5/40.5/40.5, ixButeboJuršinciKoaniImdinaNova VasDestrnikVarvarinSkomunGornji PetrovciRibnicaKon TumŠavnikPoul=0.1/0.1/0.1, l ‘=14.6/14.6/14.6, lhuleuTacurongNavapolatskPiscoDera Ismail KhanLabéAltamiraCavite CityYevpatoriiaTait=22.8/22.8/22.8, liLoretoPlacentiaAliso ViejoChomaPen-y-Bont ar OgwrCojutepeque=12.4/12.4/12.4, lioúpoliBarahonaHoPhuketLe BardoBuena ParkKayesChampigny-sur-MarneHaskovoChathamBatleyEsteioRe=22.5/22.5/22.5, m el Bo=14.6/14.6/14.6, mazunchaleZrenjaninFouchanaSurtPanč=6.7/6.7/6.7, ngoDübendorfC=11.7/11.7/11.7, nt-A=9.2/9.2/9.2, ntington StationKampong SpeuKakataMoschátoBressoVentspilsSaint-CloudTamboSidi Smai’ilDandenon=14.6/14.6/14.6, oCanagatanHelsinkiJabalpurProvidenceRuchengNizhniy NovgorodAhvāzJeparaShaoyangComayagüe=17.3/17.3/17.3, oGumlāSamā’=14.9/14.9/14.9, os Reyes de SalgadoCinisello BalsamoKashibaH=20.0/20.0/20.0, picuíbaJhang CityTepicJayapuraRio BrancoToyamaFangtingSanandajDelhi CantonmentLinghaiShorāpurToy=13.0/13.0/13.0, raKielSibuYatoParanáSanta ClaraYamagataKatihārBeykozImperat=13.5/13.5/13.5, rhamDera Ghazi KhanMiyazakiBhātpār=21.3/21.3/21.3, rugarhVerāvalAlagoinhasEdremitBandırmaSalavatGandajikaLucapaLeesburgTamaRas Tan=10.9/10.9/10.9, skişeh=12.9/12.9/12.9, venGaopingDunhuaAz Zarqā’SylhetKaihuaCaerdyddJāmnagarFuyuanGayaFlorianópolisC=1.9/1.9/1.9, y-le-MoutierSant’ArpinoPljevljaRo=0.8/0.8/0.8, ça PaulistaDarmstadtZhengdingPindamonhangabaEnschedeGirónUttarpāraHeidelbergK=6.0/6.0/6.0, üSosnowiecTanauanMya=18.4/18.4/18.4, ālSongnimSanto TomasKoiduHoshangābādOpoleNovocheboksarskArarasKhannaPunoKoforiduaAhmadpur E=19.4/19.4/19.4, āng=15.7/15.7/15.7, ġFis=9.6/9.6/9.6, ‘AqabahPembaNowgongQu=12.9/12.9/12.9}
|
3
tests/fixtures/dot/input.txt
vendored
Normal file
3
tests/fixtures/dot/input.txt
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
.;1.0
|
||||
-;1.0
|
||||
-;2.0
|
1
tests/fixtures/dot/output.txt
vendored
Normal file
1
tests/fixtures/dot/output.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
{-=1.0/1.5/2.0, .=1.0/1.0/1.0}
|
20128
tests/fixtures/rounding/input.txt
vendored
Normal file
20128
tests/fixtures/rounding/input.txt
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
tests/fixtures/rounding/output.txt
vendored
Normal file
1
tests/fixtures/rounding/output.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
{ham=14.6/25.5/33.6, jel=-9.0/18.0/46.5}
|
3
tests/fixtures/short/input.txt
vendored
Normal file
3
tests/fixtures/short/input.txt
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
a;1.0
|
||||
b;1.0
|
||||
b;2.0
|
1
tests/fixtures/short/output.txt
vendored
Normal file
1
tests/fixtures/short/output.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
{a=1.0/1.0/1.0, b=1.0/1.5/2.0}
|
1
tests/fixtures/shortest/input.txt
vendored
Normal file
1
tests/fixtures/shortest/input.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
a;1.0
|
1
tests/fixtures/shortest/output.txt
vendored
Normal file
1
tests/fixtures/shortest/output.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
{a=1.0/1.0/1.0}
|
0
tests/integration_tests.rs
Normal file
0
tests/integration_tests.rs
Normal file
Loading…
Reference in New Issue
Block a user