├── .github └── workflows │ └── release.yml ├── .gitignore ├── .travis.yml ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── rust-toolchain └── src ├── lib.rs ├── main.rs ├── parquet.rs └── types.rs /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release 2 | on: 3 | release: 4 | types: [published] 5 | 6 | jobs: 7 | build: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - name: Checkout 12 | uses: actions/checkout@v1 13 | 14 | - name: Install latest rust toolchain 15 | uses: actions-rs/toolchain@v1 16 | with: 17 | toolchain: nightly 18 | default: true 19 | override: true 20 | 21 | - uses: actions-rs/cargo@v1 22 | with: 23 | command: build 24 | args: --release 25 | 26 | - name: Strip 27 | run: | 28 | strip target/release/prometheus-parquet && mv target/release/prometheus-parquet target/release/prometheus-parquet-linux-amd64 29 | 30 | - name: Release 31 | uses: softprops/action-gh-release@v1 32 | if: startsWith(github.ref, 'refs/tags/') 33 | with: 34 | files: | 35 | target/release/prometheus-parquet-linux-amd64 36 | env: 37 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 38 | 39 | build-mac: 40 | runs-on: macos-latest 41 | 42 | steps: 43 | - name: Checkout 44 | uses: actions/checkout@v1 45 | 46 | - name: Install latest rust toolchain 47 | uses: actions-rs/toolchain@v1 48 | with: 49 | toolchain: nightly 50 | target: x86_64-apple-darwin 51 | default: true 52 | override: true 53 | 54 | - uses: actions-rs/cargo@v1 55 | with: 56 | command: build 57 | args: --release 58 | 59 | - name: Strip 60 | run: | 61 | strip target/release/prometheus-parquet && mv target/release/prometheus-parquet target/release/prometheus-parquet-darwin-amd64 62 | 63 | - name: Release 64 | uses: softprops/action-gh-release@v1 65 | if: startsWith(github.ref, 'refs/tags/') 66 | with: 67 | files: | 68 | target/release/prometheus-parquet-darwin-amd64 69 | env: 70 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # Based on the "trust" template v0.1.2 2 | # https://github.com/japaric/trust/tree/v0.1.2 3 | 4 | dist: bionic 5 | language: rust 6 | services: docker 7 | sudo: required 8 | 9 | env: 10 | global: 11 | # TODO Update this to match the name of your project. 12 | - CRATE_NAME=prometheus-parquet 13 | 14 | matrix: 15 | # TODO These are all the build jobs. Adjust as necessary. Comment out what you 16 | # don't need 17 | include: 18 | # Linux 19 | - env: TARGET=x86_64-unknown-linux-gnu 20 | 21 | # OSX 22 | - env: TARGET=x86_64-apple-darwin 23 | os: osx 24 | 25 | before_install: 26 | - set -e 27 | - rustup self update 28 | 29 | install: 30 | - source ~/.cargo/env || true 31 | 32 | script: 33 | - cargo build --target $TARGET --release 34 | 35 | after_script: set +e 36 | 37 | before_deploy: 38 | - cp target/$TARGET/release/prometheus-parquet $CRATE_NAME-$TRAVIS_TAG-$TARGET 39 | 40 | deploy: 41 | api_key: 42 | secure: "iegEGT9OThPNfD2kST+papf6aq6R+8bGSLW5Ru0wVDb8h0LMmWfMKJdbGcqyEykoys8+9Taq+ZdDGLTP8IXlZ9nLxfy9WjkIF0p7p0TmKEMOW+fIbHQ5fo4joZGZg80eO/i30XMYrmw/fEDK5A8r82S2TsBTTe6CnyiHmXwntQ/Z4klghikFpYGuemUOd5NnLfMU+dzJenZAd0PYUZ05h/x9whLB14G1t0osvp3/eif2Kwfnonhl8Ra6ZBjjDCfFr+u2V5HKCOC0YvmAC1e7UDCF5PNFPf48rqlKJNtPVQuj541qKoL1Z8j0suQcPSrWVLyCogzqiEVN5TKoArPMj9SVFsSDViiQzR5HnU4EVf3KIctBSc+LRnn7/bP5wWgHtJLL1fpECyeeqlGlHsCWPQ/8sIfwsv/Q/r/8mXHpkUYe/hT+5msyN9tVe+8DEtyALo8yxvsuoxY5IFrJcWEpovshLQ/9F3ZqDrVOlThBXrhRZ+993FQFLJRTe97zeVNl7hzMS2rNa97Ulcfk63XV2QQ+VJRrQ8N4vb0Lnb9PTXroojAgvFaeb0op6imF5rD6/O+j97ce9m1ih1r+iX2W442bvVNtXUZOqgwRiRguLCvIZi3oK6ZsCTrSxcqd19iyk0lZcl2D59JHkUmjia8dF3k/fSsARtUXwvNafUdAcbg=" 43 | file_glob: true 44 | file: $CRATE_NAME-$TRAVIS_TAG-$TARGET 45 | on: 46 | condition: $TRAVIS_RUST_VERSION = stable 47 | tags: true 48 | provider: releases 49 | skip_cleanup: true 50 | 51 | cache: cargo 52 | before_cache: 53 | # Travis can't cache files that are not readable by "others" 54 | - chmod -R a+r $HOME/.cargo 55 | 56 | branches: 57 | only: 58 | # release tags 59 | - /^v\d+\.\d+\.\d+.*$/ 60 | - master 61 | 62 | notifications: 63 | email: 64 | on_success: never 65 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "adler32" 5 | version = "1.0.3" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | checksum = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" 8 | 9 | [[package]] 10 | name = "aho-corasick" 11 | version = "0.7.13" 12 | source = "registry+https://github.com/rust-lang/crates.io-index" 13 | checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" 14 | dependencies = [ 15 | "memchr", 16 | ] 17 | 18 | [[package]] 19 | name = "alloc-no-stdlib" 20 | version = "2.0.1" 21 | source = "registry+https://github.com/rust-lang/crates.io-index" 22 | checksum = "5192ec435945d87bc2f70992b4d818154b5feede43c09fb7592146374eac90a6" 23 | 24 | [[package]] 25 | name = "alloc-stdlib" 26 | version = "0.2.1" 27 | source = "registry+https://github.com/rust-lang/crates.io-index" 28 | checksum = "697ed7edc0f1711de49ce108c541623a0af97c6c60b2f6e2b65229847ac843c2" 29 | dependencies = [ 30 | "alloc-no-stdlib", 31 | ] 32 | 33 | [[package]] 34 | name = "ansi_term" 35 | version = "0.11.0" 36 | source = "registry+https://github.com/rust-lang/crates.io-index" 37 | checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" 38 | dependencies = [ 39 | "winapi", 40 | ] 41 | 42 | [[package]] 43 | name = "approx" 44 | version = "0.1.1" 45 | source = "registry+https://github.com/rust-lang/crates.io-index" 46 | checksum = "08abcc3b4e9339e33a3d0a5ed15d84a687350c05689d825e0f6655eef9e76a94" 47 | 48 | [[package]] 49 | name = "arrow" 50 | version = "1.0.1" 51 | source = "registry+https://github.com/rust-lang/crates.io-index" 52 | checksum = "a624056cf40e99ddbdd4fc624508af6b83baf52d73b12104707760b7e31794c7" 53 | dependencies = [ 54 | "chrono", 55 | "csv", 56 | "flatbuffers", 57 | "hex", 58 | "indexmap", 59 | "lazy_static", 60 | "num", 61 | "rand 0.7.3", 62 | "regex", 63 | "serde", 64 | "serde_derive", 65 | "serde_json", 66 | ] 67 | 68 | [[package]] 69 | name = "atty" 70 | version = "0.2.11" 71 | source = "registry+https://github.com/rust-lang/crates.io-index" 72 | checksum = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" 73 | dependencies = [ 74 | "libc", 75 | "termion", 76 | "winapi", 77 | ] 78 | 79 | [[package]] 80 | name = "autocfg" 81 | version = "0.1.2" 82 | source = "registry+https://github.com/rust-lang/crates.io-index" 83 | checksum = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" 84 | 85 | [[package]] 86 | name = "autocfg" 87 | version = "1.0.1" 88 | source = "registry+https://github.com/rust-lang/crates.io-index" 89 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" 90 | 91 | [[package]] 92 | name = "backtrace" 93 | version = "0.3.15" 94 | source = "registry+https://github.com/rust-lang/crates.io-index" 95 | checksum = "f106c02a3604afcdc0df5d36cc47b44b55917dbaf3d808f71c163a0ddba64637" 96 | dependencies = [ 97 | "autocfg 0.1.2", 98 | "backtrace-sys", 99 | "cfg-if", 100 | "libc", 101 | "rustc-demangle", 102 | "winapi", 103 | ] 104 | 105 | [[package]] 106 | name = "backtrace-sys" 107 | version = "0.1.28" 108 | source = "registry+https://github.com/rust-lang/crates.io-index" 109 | checksum = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" 110 | dependencies = [ 111 | "cc", 112 | "libc", 113 | ] 114 | 115 | [[package]] 116 | name = "base64" 117 | version = "0.10.1" 118 | source = "registry+https://github.com/rust-lang/crates.io-index" 119 | checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" 120 | dependencies = [ 121 | "byteorder", 122 | ] 123 | 124 | [[package]] 125 | name = "bitflags" 126 | version = "1.0.4" 127 | source = "registry+https://github.com/rust-lang/crates.io-index" 128 | checksum = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" 129 | 130 | [[package]] 131 | name = "brotli" 132 | version = "3.3.0" 133 | source = "registry+https://github.com/rust-lang/crates.io-index" 134 | checksum = "7f29919120f08613aadcd4383764e00526fc9f18b6c0895814faeed0dd78613e" 135 | dependencies = [ 136 | "alloc-no-stdlib", 137 | "alloc-stdlib", 138 | "brotli-decompressor", 139 | ] 140 | 141 | [[package]] 142 | name = "brotli-decompressor" 143 | version = "2.3.1" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | checksum = "1052e1c3b8d4d80eb84a8b94f0a1498797b5fb96314c001156a1c761940ef4ec" 146 | dependencies = [ 147 | "alloc-no-stdlib", 148 | "alloc-stdlib", 149 | ] 150 | 151 | [[package]] 152 | name = "bstr" 153 | version = "0.2.13" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | checksum = "31accafdb70df7871592c058eca3985b71104e15ac32f64706022c58867da931" 156 | dependencies = [ 157 | "lazy_static", 158 | "memchr", 159 | "regex-automata", 160 | "serde", 161 | ] 162 | 163 | [[package]] 164 | name = "build_const" 165 | version = "0.2.1" 166 | source = "registry+https://github.com/rust-lang/crates.io-index" 167 | checksum = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" 168 | 169 | [[package]] 170 | name = "bytecount" 171 | version = "0.4.0" 172 | source = "registry+https://github.com/rust-lang/crates.io-index" 173 | checksum = "b92204551573580e078dc80017f36a213eb77a0450e4ddd8cfa0f3f2d1f0178f" 174 | 175 | [[package]] 176 | name = "byteorder" 177 | version = "1.3.1" 178 | source = "registry+https://github.com/rust-lang/crates.io-index" 179 | checksum = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" 180 | 181 | [[package]] 182 | name = "cargo_metadata" 183 | version = "0.6.4" 184 | source = "registry+https://github.com/rust-lang/crates.io-index" 185 | checksum = "e5d1b4d380e1bab994591a24c2bdd1b054f64b60bef483a8c598c7c345bc3bbe" 186 | dependencies = [ 187 | "error-chain", 188 | "semver", 189 | "serde", 190 | "serde_derive", 191 | "serde_json", 192 | ] 193 | 194 | [[package]] 195 | name = "cc" 196 | version = "1.0.60" 197 | source = "registry+https://github.com/rust-lang/crates.io-index" 198 | checksum = "ef611cc68ff783f18535d77ddd080185275713d852c4f5cbb6122c462a7a825c" 199 | dependencies = [ 200 | "jobserver", 201 | ] 202 | 203 | [[package]] 204 | name = "cfg-if" 205 | version = "0.1.7" 206 | source = "registry+https://github.com/rust-lang/crates.io-index" 207 | checksum = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" 208 | 209 | [[package]] 210 | name = "cgmath" 211 | version = "0.16.1" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "64a4b57c8f4e3a2e9ac07e0f6abc9c24b6fc9e1b54c3478cfb598f3d0023e51c" 214 | dependencies = [ 215 | "approx", 216 | "num-traits 0.1.43", 217 | "rand 0.4.6", 218 | ] 219 | 220 | [[package]] 221 | name = "chrono" 222 | version = "0.4.6" 223 | source = "registry+https://github.com/rust-lang/crates.io-index" 224 | checksum = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" 225 | dependencies = [ 226 | "num-integer", 227 | "num-traits 0.2.12", 228 | "time", 229 | ] 230 | 231 | [[package]] 232 | name = "clap" 233 | version = "2.33.0" 234 | source = "registry+https://github.com/rust-lang/crates.io-index" 235 | checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" 236 | dependencies = [ 237 | "ansi_term", 238 | "atty", 239 | "bitflags", 240 | "strsim", 241 | "textwrap", 242 | "unicode-width", 243 | "vec_map", 244 | ] 245 | 246 | [[package]] 247 | name = "colored" 248 | version = "1.8.0" 249 | source = "registry+https://github.com/rust-lang/crates.io-index" 250 | checksum = "6cdb90b60f2927f8d76139c72dbde7e10c3a2bc47c8594c9c7a66529f2687c03" 251 | dependencies = [ 252 | "lazy_static", 253 | "winconsole", 254 | ] 255 | 256 | [[package]] 257 | name = "crc" 258 | version = "1.8.1" 259 | source = "registry+https://github.com/rust-lang/crates.io-index" 260 | checksum = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" 261 | dependencies = [ 262 | "build_const", 263 | ] 264 | 265 | [[package]] 266 | name = "crc32fast" 267 | version = "1.2.0" 268 | source = "registry+https://github.com/rust-lang/crates.io-index" 269 | checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" 270 | dependencies = [ 271 | "cfg-if", 272 | ] 273 | 274 | [[package]] 275 | name = "csv" 276 | version = "1.1.3" 277 | source = "registry+https://github.com/rust-lang/crates.io-index" 278 | checksum = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279" 279 | dependencies = [ 280 | "bstr", 281 | "csv-core", 282 | "itoa", 283 | "ryu 1.0.5", 284 | "serde", 285 | ] 286 | 287 | [[package]] 288 | name = "csv-core" 289 | version = "0.1.10" 290 | source = "registry+https://github.com/rust-lang/crates.io-index" 291 | checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" 292 | dependencies = [ 293 | "memchr", 294 | ] 295 | 296 | [[package]] 297 | name = "either" 298 | version = "1.5.2" 299 | source = "registry+https://github.com/rust-lang/crates.io-index" 300 | checksum = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b" 301 | 302 | [[package]] 303 | name = "error-chain" 304 | version = "0.12.1" 305 | source = "registry+https://github.com/rust-lang/crates.io-index" 306 | checksum = "3ab49e9dcb602294bc42f9a7dfc9bc6e936fca4418ea300dbfb84fe16de0b7d9" 307 | dependencies = [ 308 | "backtrace", 309 | "version_check 0.1.5", 310 | ] 311 | 312 | [[package]] 313 | name = "fern" 314 | version = "0.5.8" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | checksum = "29d26fa0f4d433d1956746e66ec10d6bf4d6c8b93cd39965cceea7f7cc78c7dd" 317 | dependencies = [ 318 | "colored", 319 | "log", 320 | ] 321 | 322 | [[package]] 323 | name = "flatbuffers" 324 | version = "0.6.1" 325 | source = "registry+https://github.com/rust-lang/crates.io-index" 326 | checksum = "a788f068dd10687940565bf4b5480ee943176cbd114b12e811074bcf7c04e4b9" 327 | dependencies = [ 328 | "smallvec", 329 | ] 330 | 331 | [[package]] 332 | name = "flate2" 333 | version = "1.0.7" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | checksum = "f87e68aa82b2de08a6e037f1385455759df6e445a8df5e005b4297191dbf18aa" 336 | dependencies = [ 337 | "crc32fast", 338 | "libc", 339 | "miniz-sys", 340 | "miniz_oxide_c_api", 341 | ] 342 | 343 | [[package]] 344 | name = "fuchsia-cprng" 345 | version = "0.1.1" 346 | source = "registry+https://github.com/rust-lang/crates.io-index" 347 | checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" 348 | 349 | [[package]] 350 | name = "getrandom" 351 | version = "0.1.15" 352 | source = "registry+https://github.com/rust-lang/crates.io-index" 353 | checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" 354 | dependencies = [ 355 | "cfg-if", 356 | "libc", 357 | "wasi", 358 | ] 359 | 360 | [[package]] 361 | name = "glob" 362 | version = "0.2.11" 363 | source = "registry+https://github.com/rust-lang/crates.io-index" 364 | checksum = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" 365 | 366 | [[package]] 367 | name = "glob" 368 | version = "0.3.0" 369 | source = "registry+https://github.com/rust-lang/crates.io-index" 370 | checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" 371 | 372 | [[package]] 373 | name = "hashbrown" 374 | version = "0.9.1" 375 | source = "registry+https://github.com/rust-lang/crates.io-index" 376 | checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" 377 | 378 | [[package]] 379 | name = "heck" 380 | version = "0.3.1" 381 | source = "registry+https://github.com/rust-lang/crates.io-index" 382 | checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" 383 | dependencies = [ 384 | "unicode-segmentation", 385 | ] 386 | 387 | [[package]] 388 | name = "hex" 389 | version = "0.4.2" 390 | source = "registry+https://github.com/rust-lang/crates.io-index" 391 | checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" 392 | 393 | [[package]] 394 | name = "indexmap" 395 | version = "1.6.0" 396 | source = "registry+https://github.com/rust-lang/crates.io-index" 397 | checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" 398 | dependencies = [ 399 | "autocfg 1.0.1", 400 | "hashbrown", 401 | ] 402 | 403 | [[package]] 404 | name = "integer-encoding" 405 | version = "1.0.5" 406 | source = "registry+https://github.com/rust-lang/crates.io-index" 407 | checksum = "26746cbc2e680af687e88d717f20ff90079bd10fc984ad57d277cd0e37309fa5" 408 | 409 | [[package]] 410 | name = "itertools" 411 | version = "0.9.0" 412 | source = "registry+https://github.com/rust-lang/crates.io-index" 413 | checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" 414 | dependencies = [ 415 | "either", 416 | ] 417 | 418 | [[package]] 419 | name = "itoa" 420 | version = "0.4.4" 421 | source = "registry+https://github.com/rust-lang/crates.io-index" 422 | checksum = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" 423 | 424 | [[package]] 425 | name = "jobserver" 426 | version = "0.1.21" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" 429 | dependencies = [ 430 | "libc", 431 | ] 432 | 433 | [[package]] 434 | name = "lazy_static" 435 | version = "1.4.0" 436 | source = "registry+https://github.com/rust-lang/crates.io-index" 437 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 438 | 439 | [[package]] 440 | name = "libc" 441 | version = "0.2.79" 442 | source = "registry+https://github.com/rust-lang/crates.io-index" 443 | checksum = "2448f6066e80e3bfc792e9c98bf705b4b0fc6e8ef5b43e5889aff0eaa9c58743" 444 | 445 | [[package]] 446 | name = "log" 447 | version = "0.4.6" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" 450 | dependencies = [ 451 | "cfg-if", 452 | ] 453 | 454 | [[package]] 455 | name = "lz4" 456 | version = "1.23.1" 457 | source = "registry+https://github.com/rust-lang/crates.io-index" 458 | checksum = "43c94a9f09a60017f373020cc93d4291db4cd92b0db64ff25927f27d09dc23d5" 459 | dependencies = [ 460 | "libc", 461 | "lz4-sys", 462 | "skeptic", 463 | ] 464 | 465 | [[package]] 466 | name = "lz4-sys" 467 | version = "1.8.3" 468 | source = "registry+https://github.com/rust-lang/crates.io-index" 469 | checksum = "20ab022822e9331c58d373acdd6b98085bace058ac6837b8266f213a2fccdafe" 470 | dependencies = [ 471 | "cc", 472 | "libc", 473 | ] 474 | 475 | [[package]] 476 | name = "memchr" 477 | version = "2.3.3" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" 480 | 481 | [[package]] 482 | name = "miniz-sys" 483 | version = "0.1.11" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | checksum = "0300eafb20369952951699b68243ab4334f4b10a88f411c221d444b36c40e649" 486 | dependencies = [ 487 | "cc", 488 | "libc", 489 | ] 490 | 491 | [[package]] 492 | name = "miniz_oxide" 493 | version = "0.2.1" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | checksum = "c468f2369f07d651a5d0bb2c9079f8488a66d5466efe42d0c5c6466edcb7f71e" 496 | dependencies = [ 497 | "adler32", 498 | ] 499 | 500 | [[package]] 501 | name = "miniz_oxide_c_api" 502 | version = "0.2.1" 503 | source = "registry+https://github.com/rust-lang/crates.io-index" 504 | checksum = "b7fe927a42e3807ef71defb191dc87d4e24479b221e67015fe38ae2b7b447bab" 505 | dependencies = [ 506 | "cc", 507 | "crc", 508 | "libc", 509 | "miniz_oxide", 510 | ] 511 | 512 | [[package]] 513 | name = "minreq" 514 | version = "1.1.2" 515 | source = "registry+https://github.com/rust-lang/crates.io-index" 516 | checksum = "2be05cd45a9f6d5c179a34fd986433f49c85dbe57a09bd1004a1a1a9d524ed7c" 517 | dependencies = [ 518 | "rustls", 519 | "webpki", 520 | "webpki-roots", 521 | ] 522 | 523 | [[package]] 524 | name = "num" 525 | version = "0.3.0" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | checksum = "ab3e176191bc4faad357e3122c4747aa098ac880e88b168f106386128736cf4a" 528 | dependencies = [ 529 | "num-bigint", 530 | "num-complex", 531 | "num-integer", 532 | "num-iter", 533 | "num-rational", 534 | "num-traits 0.2.12", 535 | ] 536 | 537 | [[package]] 538 | name = "num-bigint" 539 | version = "0.3.0" 540 | source = "registry+https://github.com/rust-lang/crates.io-index" 541 | checksum = "b7f3fc75e3697059fb1bc465e3d8cca6cf92f56854f201158b3f9c77d5a3cfa0" 542 | dependencies = [ 543 | "autocfg 1.0.1", 544 | "num-integer", 545 | "num-traits 0.2.12", 546 | ] 547 | 548 | [[package]] 549 | name = "num-complex" 550 | version = "0.3.0" 551 | source = "registry+https://github.com/rust-lang/crates.io-index" 552 | checksum = "b05ad05bd8977050b171b3f6b48175fea6e0565b7981059b486075e1026a9fb5" 553 | dependencies = [ 554 | "num-traits 0.2.12", 555 | ] 556 | 557 | [[package]] 558 | name = "num-integer" 559 | version = "0.1.43" 560 | source = "registry+https://github.com/rust-lang/crates.io-index" 561 | checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" 562 | dependencies = [ 563 | "autocfg 1.0.1", 564 | "num-traits 0.2.12", 565 | ] 566 | 567 | [[package]] 568 | name = "num-iter" 569 | version = "0.1.41" 570 | source = "registry+https://github.com/rust-lang/crates.io-index" 571 | checksum = "7a6e6b7c748f995c4c29c5f5ae0248536e04a5739927c74ec0fa564805094b9f" 572 | dependencies = [ 573 | "autocfg 1.0.1", 574 | "num-integer", 575 | "num-traits 0.2.12", 576 | ] 577 | 578 | [[package]] 579 | name = "num-rational" 580 | version = "0.3.0" 581 | source = "registry+https://github.com/rust-lang/crates.io-index" 582 | checksum = "a5b4d7360f362cfb50dde8143501e6940b22f644be75a4cc90b2d81968908138" 583 | dependencies = [ 584 | "autocfg 1.0.1", 585 | "num-bigint", 586 | "num-integer", 587 | "num-traits 0.2.12", 588 | ] 589 | 590 | [[package]] 591 | name = "num-traits" 592 | version = "0.1.43" 593 | source = "registry+https://github.com/rust-lang/crates.io-index" 594 | checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" 595 | dependencies = [ 596 | "num-traits 0.2.12", 597 | ] 598 | 599 | [[package]] 600 | name = "num-traits" 601 | version = "0.2.12" 602 | source = "registry+https://github.com/rust-lang/crates.io-index" 603 | checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" 604 | dependencies = [ 605 | "autocfg 1.0.1", 606 | ] 607 | 608 | [[package]] 609 | name = "num_cpus" 610 | version = "1.10.0" 611 | source = "registry+https://github.com/rust-lang/crates.io-index" 612 | checksum = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" 613 | dependencies = [ 614 | "libc", 615 | ] 616 | 617 | [[package]] 618 | name = "numtoa" 619 | version = "0.1.0" 620 | source = "registry+https://github.com/rust-lang/crates.io-index" 621 | checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" 622 | 623 | [[package]] 624 | name = "ordered-float" 625 | version = "1.1.0" 626 | source = "registry+https://github.com/rust-lang/crates.io-index" 627 | checksum = "3741934be594d77de1c8461ebcbbe866f585ea616a9753aa78f2bdc69f0e4579" 628 | dependencies = [ 629 | "num-traits 0.2.12", 630 | ] 631 | 632 | [[package]] 633 | name = "parquet" 634 | version = "1.0.1" 635 | source = "registry+https://github.com/rust-lang/crates.io-index" 636 | checksum = "05e0b7eee769602da455dbee03697e29e5d3630d14f11dbc5ac3052dfef815ce" 637 | dependencies = [ 638 | "arrow", 639 | "brotli", 640 | "byteorder", 641 | "chrono", 642 | "flate2", 643 | "lz4", 644 | "num-bigint", 645 | "parquet-format", 646 | "serde_json", 647 | "snap", 648 | "thrift", 649 | "zstd", 650 | ] 651 | 652 | [[package]] 653 | name = "parquet-format" 654 | version = "2.6.1" 655 | source = "registry+https://github.com/rust-lang/crates.io-index" 656 | checksum = "a5bc6b23543b5dedc8f6cce50758a35e5582e148e0cfa26bd0cacd569cda5b71" 657 | dependencies = [ 658 | "thrift", 659 | ] 660 | 661 | [[package]] 662 | name = "parquet_derive" 663 | version = "1.0.1" 664 | source = "git+https://github.com/ccakes/parquet_derive#6643210197285a2a5892065fda375884f2551660" 665 | dependencies = [ 666 | "parquet", 667 | "proc-macro2 0.4.30", 668 | "quote 0.6.12", 669 | "syn 0.15.34", 670 | ] 671 | 672 | [[package]] 673 | name = "ppv-lite86" 674 | version = "0.2.9" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" 677 | 678 | [[package]] 679 | name = "proc-macro-error" 680 | version = "1.0.4" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 683 | dependencies = [ 684 | "proc-macro-error-attr", 685 | "proc-macro2 1.0.24", 686 | "quote 1.0.7", 687 | "syn 1.0.42", 688 | "version_check 0.9.2", 689 | ] 690 | 691 | [[package]] 692 | name = "proc-macro-error-attr" 693 | version = "1.0.4" 694 | source = "registry+https://github.com/rust-lang/crates.io-index" 695 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 696 | dependencies = [ 697 | "proc-macro2 1.0.24", 698 | "quote 1.0.7", 699 | "version_check 0.9.2", 700 | ] 701 | 702 | [[package]] 703 | name = "proc-macro2" 704 | version = "0.4.30" 705 | source = "registry+https://github.com/rust-lang/crates.io-index" 706 | checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" 707 | dependencies = [ 708 | "unicode-xid 0.1.0", 709 | ] 710 | 711 | [[package]] 712 | name = "proc-macro2" 713 | version = "1.0.24" 714 | source = "registry+https://github.com/rust-lang/crates.io-index" 715 | checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" 716 | dependencies = [ 717 | "unicode-xid 0.2.1", 718 | ] 719 | 720 | [[package]] 721 | name = "prometheus-parquet" 722 | version = "0.2.0" 723 | dependencies = [ 724 | "chrono", 725 | "fern", 726 | "log", 727 | "minreq", 728 | "parquet", 729 | "parquet_derive", 730 | "prometheus-parse", 731 | "serde", 732 | "serde_derive", 733 | "serde_json", 734 | "structopt", 735 | ] 736 | 737 | [[package]] 738 | name = "prometheus-parse" 739 | version = "0.2.1" 740 | source = "registry+https://github.com/rust-lang/crates.io-index" 741 | checksum = "2c918c6632cce1961ffa300c0ca7d16c6a9c8bbaefc8ee54dec0f983ab927c76" 742 | dependencies = [ 743 | "chrono", 744 | "lazy_static", 745 | "regex", 746 | ] 747 | 748 | [[package]] 749 | name = "pulldown-cmark" 750 | version = "0.2.0" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | checksum = "eef52fac62d0ea7b9b4dc7da092aa64ea7ec3d90af6679422d3d7e0e14b6ee15" 753 | dependencies = [ 754 | "bitflags", 755 | ] 756 | 757 | [[package]] 758 | name = "quote" 759 | version = "0.6.12" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" 762 | dependencies = [ 763 | "proc-macro2 0.4.30", 764 | ] 765 | 766 | [[package]] 767 | name = "quote" 768 | version = "1.0.7" 769 | source = "registry+https://github.com/rust-lang/crates.io-index" 770 | checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" 771 | dependencies = [ 772 | "proc-macro2 1.0.24", 773 | ] 774 | 775 | [[package]] 776 | name = "rand" 777 | version = "0.4.6" 778 | source = "registry+https://github.com/rust-lang/crates.io-index" 779 | checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" 780 | dependencies = [ 781 | "fuchsia-cprng", 782 | "libc", 783 | "rand_core 0.3.1", 784 | "rdrand", 785 | "winapi", 786 | ] 787 | 788 | [[package]] 789 | name = "rand" 790 | version = "0.7.3" 791 | source = "registry+https://github.com/rust-lang/crates.io-index" 792 | checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" 793 | dependencies = [ 794 | "getrandom", 795 | "libc", 796 | "rand_chacha", 797 | "rand_core 0.5.1", 798 | "rand_hc", 799 | ] 800 | 801 | [[package]] 802 | name = "rand_chacha" 803 | version = "0.2.2" 804 | source = "registry+https://github.com/rust-lang/crates.io-index" 805 | checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" 806 | dependencies = [ 807 | "ppv-lite86", 808 | "rand_core 0.5.1", 809 | ] 810 | 811 | [[package]] 812 | name = "rand_core" 813 | version = "0.3.1" 814 | source = "registry+https://github.com/rust-lang/crates.io-index" 815 | checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" 816 | dependencies = [ 817 | "rand_core 0.4.0", 818 | ] 819 | 820 | [[package]] 821 | name = "rand_core" 822 | version = "0.4.0" 823 | source = "registry+https://github.com/rust-lang/crates.io-index" 824 | checksum = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" 825 | 826 | [[package]] 827 | name = "rand_core" 828 | version = "0.5.1" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" 831 | dependencies = [ 832 | "getrandom", 833 | ] 834 | 835 | [[package]] 836 | name = "rand_hc" 837 | version = "0.2.0" 838 | source = "registry+https://github.com/rust-lang/crates.io-index" 839 | checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" 840 | dependencies = [ 841 | "rand_core 0.5.1", 842 | ] 843 | 844 | [[package]] 845 | name = "rdrand" 846 | version = "0.4.0" 847 | source = "registry+https://github.com/rust-lang/crates.io-index" 848 | checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" 849 | dependencies = [ 850 | "rand_core 0.3.1", 851 | ] 852 | 853 | [[package]] 854 | name = "redox_syscall" 855 | version = "0.1.54" 856 | source = "registry+https://github.com/rust-lang/crates.io-index" 857 | checksum = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" 858 | 859 | [[package]] 860 | name = "redox_termios" 861 | version = "0.1.1" 862 | source = "registry+https://github.com/rust-lang/crates.io-index" 863 | checksum = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" 864 | dependencies = [ 865 | "redox_syscall", 866 | ] 867 | 868 | [[package]] 869 | name = "regex" 870 | version = "1.3.9" 871 | source = "registry+https://github.com/rust-lang/crates.io-index" 872 | checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" 873 | dependencies = [ 874 | "aho-corasick", 875 | "memchr", 876 | "regex-syntax", 877 | "thread_local", 878 | ] 879 | 880 | [[package]] 881 | name = "regex-automata" 882 | version = "0.1.9" 883 | source = "registry+https://github.com/rust-lang/crates.io-index" 884 | checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" 885 | dependencies = [ 886 | "byteorder", 887 | ] 888 | 889 | [[package]] 890 | name = "regex-syntax" 891 | version = "0.6.18" 892 | source = "registry+https://github.com/rust-lang/crates.io-index" 893 | checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" 894 | 895 | [[package]] 896 | name = "remove_dir_all" 897 | version = "0.5.1" 898 | source = "registry+https://github.com/rust-lang/crates.io-index" 899 | checksum = "3488ba1b9a2084d38645c4c08276a1752dcbf2c7130d74f1569681ad5d2799c5" 900 | dependencies = [ 901 | "winapi", 902 | ] 903 | 904 | [[package]] 905 | name = "rgb" 906 | version = "0.8.13" 907 | source = "registry+https://github.com/rust-lang/crates.io-index" 908 | checksum = "4f089652ca87f5a82a62935ec6172a534066c7b97be003cc8f702ee9a7a59c92" 909 | 910 | [[package]] 911 | name = "ring" 912 | version = "0.14.6" 913 | source = "registry+https://github.com/rust-lang/crates.io-index" 914 | checksum = "426bc186e3e95cac1e4a4be125a4aca7e84c2d616ffc02244eef36e2a60a093c" 915 | dependencies = [ 916 | "cc", 917 | "lazy_static", 918 | "libc", 919 | "spin", 920 | "untrusted", 921 | "winapi", 922 | ] 923 | 924 | [[package]] 925 | name = "rustc-demangle" 926 | version = "0.1.14" 927 | source = "registry+https://github.com/rust-lang/crates.io-index" 928 | checksum = "ccc78bfd5acd7bf3e89cffcf899e5cb1a52d6fafa8dec2739ad70c9577a57288" 929 | 930 | [[package]] 931 | name = "rustls" 932 | version = "0.15.2" 933 | source = "registry+https://github.com/rust-lang/crates.io-index" 934 | checksum = "f271e3552cd835fa28c541c34a7e8fdd8cdff09d77fe4eb8f6c42e87a11b096e" 935 | dependencies = [ 936 | "base64", 937 | "log", 938 | "ring", 939 | "sct", 940 | "untrusted", 941 | "webpki", 942 | ] 943 | 944 | [[package]] 945 | name = "ryu" 946 | version = "0.2.8" 947 | source = "registry+https://github.com/rust-lang/crates.io-index" 948 | checksum = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" 949 | 950 | [[package]] 951 | name = "ryu" 952 | version = "1.0.5" 953 | source = "registry+https://github.com/rust-lang/crates.io-index" 954 | checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" 955 | 956 | [[package]] 957 | name = "same-file" 958 | version = "1.0.4" 959 | source = "registry+https://github.com/rust-lang/crates.io-index" 960 | checksum = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" 961 | dependencies = [ 962 | "winapi-util", 963 | ] 964 | 965 | [[package]] 966 | name = "sct" 967 | version = "0.5.0" 968 | source = "registry+https://github.com/rust-lang/crates.io-index" 969 | checksum = "2f5adf8fbd58e1b1b52699dc8bed2630faecb6d8c7bee77d009d6bbe4af569b9" 970 | dependencies = [ 971 | "ring", 972 | "untrusted", 973 | ] 974 | 975 | [[package]] 976 | name = "semver" 977 | version = "0.9.0" 978 | source = "registry+https://github.com/rust-lang/crates.io-index" 979 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 980 | dependencies = [ 981 | "semver-parser", 982 | "serde", 983 | ] 984 | 985 | [[package]] 986 | name = "semver-parser" 987 | version = "0.7.0" 988 | source = "registry+https://github.com/rust-lang/crates.io-index" 989 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 990 | 991 | [[package]] 992 | name = "serde" 993 | version = "1.0.91" 994 | source = "registry+https://github.com/rust-lang/crates.io-index" 995 | checksum = "a72e9b96fa45ce22a4bc23da3858dfccfd60acd28a25bcd328a98fdd6bea43fd" 996 | 997 | [[package]] 998 | name = "serde_derive" 999 | version = "1.0.91" 1000 | source = "registry+https://github.com/rust-lang/crates.io-index" 1001 | checksum = "101b495b109a3e3ca8c4cbe44cf62391527cdfb6ba15821c5ce80bcd5ea23f9f" 1002 | dependencies = [ 1003 | "proc-macro2 0.4.30", 1004 | "quote 0.6.12", 1005 | "syn 0.15.34", 1006 | ] 1007 | 1008 | [[package]] 1009 | name = "serde_json" 1010 | version = "1.0.39" 1011 | source = "registry+https://github.com/rust-lang/crates.io-index" 1012 | checksum = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" 1013 | dependencies = [ 1014 | "indexmap", 1015 | "itoa", 1016 | "ryu 0.2.8", 1017 | "serde", 1018 | ] 1019 | 1020 | [[package]] 1021 | name = "skeptic" 1022 | version = "0.13.4" 1023 | source = "registry+https://github.com/rust-lang/crates.io-index" 1024 | checksum = "d6fb8ed853fdc19ce09752d63f3a2e5b5158aeb261520cd75eb618bd60305165" 1025 | dependencies = [ 1026 | "bytecount", 1027 | "cargo_metadata", 1028 | "error-chain", 1029 | "glob 0.2.11", 1030 | "pulldown-cmark", 1031 | "serde_json", 1032 | "tempdir", 1033 | "walkdir", 1034 | ] 1035 | 1036 | [[package]] 1037 | name = "smallvec" 1038 | version = "1.4.2" 1039 | source = "registry+https://github.com/rust-lang/crates.io-index" 1040 | checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" 1041 | 1042 | [[package]] 1043 | name = "snap" 1044 | version = "1.0.1" 1045 | source = "registry+https://github.com/rust-lang/crates.io-index" 1046 | checksum = "da73c8f77aebc0e40c300b93f0a5f1bece7a248a36eee287d4e095f35c7b7d6e" 1047 | 1048 | [[package]] 1049 | name = "spin" 1050 | version = "0.5.0" 1051 | source = "registry+https://github.com/rust-lang/crates.io-index" 1052 | checksum = "44363f6f51401c34e7be73db0db371c04705d35efbe9f7d6082e03a921a32c55" 1053 | 1054 | [[package]] 1055 | name = "strsim" 1056 | version = "0.8.0" 1057 | source = "registry+https://github.com/rust-lang/crates.io-index" 1058 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 1059 | 1060 | [[package]] 1061 | name = "structopt" 1062 | version = "0.3.18" 1063 | source = "registry+https://github.com/rust-lang/crates.io-index" 1064 | checksum = "a33f6461027d7f08a13715659b2948e1602c31a3756aeae9378bfe7518c72e82" 1065 | dependencies = [ 1066 | "clap", 1067 | "lazy_static", 1068 | "structopt-derive", 1069 | ] 1070 | 1071 | [[package]] 1072 | name = "structopt-derive" 1073 | version = "0.4.11" 1074 | source = "registry+https://github.com/rust-lang/crates.io-index" 1075 | checksum = "c92e775028122a4b3dd55d58f14fc5120289c69bee99df1d117ae30f84b225c9" 1076 | dependencies = [ 1077 | "heck", 1078 | "proc-macro-error", 1079 | "proc-macro2 1.0.24", 1080 | "quote 1.0.7", 1081 | "syn 1.0.42", 1082 | ] 1083 | 1084 | [[package]] 1085 | name = "syn" 1086 | version = "0.15.34" 1087 | source = "registry+https://github.com/rust-lang/crates.io-index" 1088 | checksum = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe" 1089 | dependencies = [ 1090 | "proc-macro2 0.4.30", 1091 | "quote 0.6.12", 1092 | "unicode-xid 0.1.0", 1093 | ] 1094 | 1095 | [[package]] 1096 | name = "syn" 1097 | version = "1.0.42" 1098 | source = "registry+https://github.com/rust-lang/crates.io-index" 1099 | checksum = "9c51d92969d209b54a98397e1b91c8ae82d8c87a7bb87df0b29aa2ad81454228" 1100 | dependencies = [ 1101 | "proc-macro2 1.0.24", 1102 | "quote 1.0.7", 1103 | "unicode-xid 0.2.1", 1104 | ] 1105 | 1106 | [[package]] 1107 | name = "tempdir" 1108 | version = "0.3.7" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" 1111 | dependencies = [ 1112 | "rand 0.4.6", 1113 | "remove_dir_all", 1114 | ] 1115 | 1116 | [[package]] 1117 | name = "termion" 1118 | version = "1.5.2" 1119 | source = "registry+https://github.com/rust-lang/crates.io-index" 1120 | checksum = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" 1121 | dependencies = [ 1122 | "libc", 1123 | "numtoa", 1124 | "redox_syscall", 1125 | "redox_termios", 1126 | ] 1127 | 1128 | [[package]] 1129 | name = "textwrap" 1130 | version = "0.11.0" 1131 | source = "registry+https://github.com/rust-lang/crates.io-index" 1132 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 1133 | dependencies = [ 1134 | "unicode-width", 1135 | ] 1136 | 1137 | [[package]] 1138 | name = "thread_local" 1139 | version = "1.0.1" 1140 | source = "registry+https://github.com/rust-lang/crates.io-index" 1141 | checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" 1142 | dependencies = [ 1143 | "lazy_static", 1144 | ] 1145 | 1146 | [[package]] 1147 | name = "threadpool" 1148 | version = "1.7.1" 1149 | source = "registry+https://github.com/rust-lang/crates.io-index" 1150 | checksum = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" 1151 | dependencies = [ 1152 | "num_cpus", 1153 | ] 1154 | 1155 | [[package]] 1156 | name = "thrift" 1157 | version = "0.13.0" 1158 | source = "registry+https://github.com/rust-lang/crates.io-index" 1159 | checksum = "0c6d965454947cc7266d22716ebfd07b18d84ebaf35eec558586bbb2a8cb6b5b" 1160 | dependencies = [ 1161 | "byteorder", 1162 | "integer-encoding", 1163 | "log", 1164 | "ordered-float", 1165 | "threadpool", 1166 | ] 1167 | 1168 | [[package]] 1169 | name = "time" 1170 | version = "0.1.42" 1171 | source = "registry+https://github.com/rust-lang/crates.io-index" 1172 | checksum = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" 1173 | dependencies = [ 1174 | "libc", 1175 | "redox_syscall", 1176 | "winapi", 1177 | ] 1178 | 1179 | [[package]] 1180 | name = "unicode-segmentation" 1181 | version = "1.2.1" 1182 | source = "registry+https://github.com/rust-lang/crates.io-index" 1183 | checksum = "aa6024fc12ddfd1c6dbc14a80fa2324d4568849869b779f6bd37e5e4c03344d1" 1184 | 1185 | [[package]] 1186 | name = "unicode-width" 1187 | version = "0.1.5" 1188 | source = "registry+https://github.com/rust-lang/crates.io-index" 1189 | checksum = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" 1190 | 1191 | [[package]] 1192 | name = "unicode-xid" 1193 | version = "0.1.0" 1194 | source = "registry+https://github.com/rust-lang/crates.io-index" 1195 | checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 1196 | 1197 | [[package]] 1198 | name = "unicode-xid" 1199 | version = "0.2.1" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" 1202 | 1203 | [[package]] 1204 | name = "untrusted" 1205 | version = "0.6.2" 1206 | source = "registry+https://github.com/rust-lang/crates.io-index" 1207 | checksum = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" 1208 | 1209 | [[package]] 1210 | name = "vec_map" 1211 | version = "0.8.1" 1212 | source = "registry+https://github.com/rust-lang/crates.io-index" 1213 | checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" 1214 | 1215 | [[package]] 1216 | name = "version_check" 1217 | version = "0.1.5" 1218 | source = "registry+https://github.com/rust-lang/crates.io-index" 1219 | checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" 1220 | 1221 | [[package]] 1222 | name = "version_check" 1223 | version = "0.9.2" 1224 | source = "registry+https://github.com/rust-lang/crates.io-index" 1225 | checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" 1226 | 1227 | [[package]] 1228 | name = "walkdir" 1229 | version = "2.2.7" 1230 | source = "registry+https://github.com/rust-lang/crates.io-index" 1231 | checksum = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1" 1232 | dependencies = [ 1233 | "same-file", 1234 | "winapi", 1235 | "winapi-util", 1236 | ] 1237 | 1238 | [[package]] 1239 | name = "wasi" 1240 | version = "0.9.0+wasi-snapshot-preview1" 1241 | source = "registry+https://github.com/rust-lang/crates.io-index" 1242 | checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 1243 | 1244 | [[package]] 1245 | name = "webpki" 1246 | version = "0.19.1" 1247 | source = "registry+https://github.com/rust-lang/crates.io-index" 1248 | checksum = "4f7e1cd7900a3a6b65a3e8780c51a3e6b59c0e2c55c6dc69578c288d69f7d082" 1249 | dependencies = [ 1250 | "ring", 1251 | "untrusted", 1252 | ] 1253 | 1254 | [[package]] 1255 | name = "webpki-roots" 1256 | version = "0.16.0" 1257 | source = "registry+https://github.com/rust-lang/crates.io-index" 1258 | checksum = "c10fa4212003ba19a564f25cd8ab572c6791f99a03cc219c13ed35ccab00de0e" 1259 | dependencies = [ 1260 | "untrusted", 1261 | "webpki", 1262 | ] 1263 | 1264 | [[package]] 1265 | name = "winapi" 1266 | version = "0.3.7" 1267 | source = "registry+https://github.com/rust-lang/crates.io-index" 1268 | checksum = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" 1269 | dependencies = [ 1270 | "winapi-i686-pc-windows-gnu", 1271 | "winapi-x86_64-pc-windows-gnu", 1272 | ] 1273 | 1274 | [[package]] 1275 | name = "winapi-i686-pc-windows-gnu" 1276 | version = "0.4.0" 1277 | source = "registry+https://github.com/rust-lang/crates.io-index" 1278 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1279 | 1280 | [[package]] 1281 | name = "winapi-util" 1282 | version = "0.1.2" 1283 | source = "registry+https://github.com/rust-lang/crates.io-index" 1284 | checksum = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" 1285 | dependencies = [ 1286 | "winapi", 1287 | ] 1288 | 1289 | [[package]] 1290 | name = "winapi-x86_64-pc-windows-gnu" 1291 | version = "0.4.0" 1292 | source = "registry+https://github.com/rust-lang/crates.io-index" 1293 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1294 | 1295 | [[package]] 1296 | name = "winconsole" 1297 | version = "0.10.0" 1298 | source = "registry+https://github.com/rust-lang/crates.io-index" 1299 | checksum = "3ef84b96d10db72dd980056666d7f1e7663ce93d82fa33b63e71c966f4cf5032" 1300 | dependencies = [ 1301 | "cgmath", 1302 | "lazy_static", 1303 | "rgb", 1304 | "winapi", 1305 | ] 1306 | 1307 | [[package]] 1308 | name = "zstd" 1309 | version = "0.5.3+zstd.1.4.5" 1310 | source = "registry+https://github.com/rust-lang/crates.io-index" 1311 | checksum = "01b32eaf771efa709e8308605bbf9319bf485dc1503179ec0469b611937c0cd8" 1312 | dependencies = [ 1313 | "zstd-safe", 1314 | ] 1315 | 1316 | [[package]] 1317 | name = "zstd-safe" 1318 | version = "2.0.5+zstd.1.4.5" 1319 | source = "registry+https://github.com/rust-lang/crates.io-index" 1320 | checksum = "1cfb642e0d27f64729a639c52db457e0ae906e7bc6f5fe8f5c453230400f1055" 1321 | dependencies = [ 1322 | "libc", 1323 | "zstd-sys", 1324 | ] 1325 | 1326 | [[package]] 1327 | name = "zstd-sys" 1328 | version = "1.4.17+zstd.1.4.5" 1329 | source = "registry+https://github.com/rust-lang/crates.io-index" 1330 | checksum = "b89249644df056b522696b1bb9e7c18c87e8ffa3e2f0dc3b0155875d6498f01b" 1331 | dependencies = [ 1332 | "cc", 1333 | "glob 0.3.0", 1334 | "itertools", 1335 | "libc", 1336 | ] 1337 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "prometheus-parquet" 3 | version = "0.2.0" 4 | authors = ["Cameron Daniel "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | log = "^0.4" 9 | fern = { version = "^0.5", features = ["colored"] } 10 | structopt = "^0.3" 11 | 12 | serde = "^1.0" 13 | serde_derive = "^1.0" 14 | serde_json = "^1.0" 15 | 16 | chrono = "^0.4" 17 | minreq = { version = "^1.1", features = ["https"] } 18 | parquet = "^1.0" 19 | parquet_derive = { git = "https://github.com/ccakes/parquet_derive" } 20 | prometheus-parse = "^0.2" 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # prometheus-parquet 2 | 3 | A simple tool to scrape a Prometheus endpoint and dump the set of metrics into a Parquet file. 4 | 5 | Useful for running in a cron, then storing the resulting Parquet file in your storage+querying service of choice. 6 | 7 | ## Building 8 | 9 | This uses some dependencies which are only in Git, so it can't be hosted on crates.io. To run this you'll need the nightly Rust compiler and to build it from source. 10 | 11 | See [rustup.rs](https://rustup.rs) for installing the Rust compiler. 12 | 13 | ```bash 14 | # Install nightly 15 | $ rustup toolchain install nightly 16 | 17 | # Clone and build 18 | $ git clone https://github.com/ccakes/prometheus-parquet 19 | $ cd prometheus-parquet 20 | $ cargo build --release 21 | 22 | # Run 23 | target/release/prometheus-parquet --help 24 | ``` 25 | 26 | ## Usage 27 | 28 | ```bash 29 | $ prometheus-parquet --prometheus http://127.0.0.1:9090/metrics --output $(hostname).parquet 30 | 31 | # optional 32 | $ aws s3 cp $(hostname).parquet s3://my-bucket/prom_dumps/year=$(date +%Y)/month=$(date +%m)/day=$(date +%d)/hour=$(date +%H)/ 33 | ``` 34 | 35 | ## Contributing 36 | 37 | PRs, bug reports, general complaining is all welcome 38 | 39 | ## License 40 | 41 | See [LICENSE](LICENSE). 42 | -------------------------------------------------------------------------------- /rust-toolchain: -------------------------------------------------------------------------------- 1 | nightly 2 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | use structopt::StructOpt; 2 | 3 | mod parquet; 4 | mod types; 5 | 6 | use types::Metric; 7 | 8 | use std::convert::TryFrom; 9 | use std::error::Error; 10 | use std::io; 11 | use std::path::PathBuf; 12 | 13 | /// prometheus-parquet 14 | #[derive(StructOpt)] 15 | #[structopt(name = "prometheus-parquet")] 16 | struct Args { 17 | /// Prometheus addr 18 | #[structopt(short = "p", long = "prometheus")] 19 | prometheus: String, 20 | 21 | /// Output file 22 | #[structopt(short = "o", long = "output")] 23 | output: PathBuf, 24 | 25 | /// Logging verbosity 26 | #[structopt(short = "v", parse(from_occurrences))] 27 | verbose: u8 28 | } 29 | 30 | pub fn run() -> Result<(), Box> { 31 | let args = Args::from_args(); 32 | 33 | // Derive log verbosity from args 34 | let log_level = match args.verbose { 35 | 0 => log::LevelFilter::Info, 36 | 1 => log::LevelFilter::Debug, 37 | _ => log::LevelFilter::Trace 38 | }; 39 | 40 | // Init logger 41 | fern::Dispatch::new() 42 | .level(log::LevelFilter::Warn) 43 | .level_for(module_path!(), log_level) 44 | .format(|out, message, record| { 45 | out.finish(format_args!( 46 | "{}: {}", 47 | record.level(), 48 | message 49 | )) 50 | }) 51 | .chain(io::stdout()) 52 | .apply()?; 53 | 54 | // Check our output doesn't exist 55 | if args.output.exists() { 56 | log::error!("Output file already exists!"); 57 | std::process::exit(1); 58 | } 59 | 60 | let response = minreq::get(args.prometheus).send()?; 61 | let lines: Vec<_> = response.body 62 | .lines() 63 | .map(|s| Ok(s.to_owned())) 64 | .collect(); 65 | 66 | let prom = prometheus_parse::Scrape::parse(lines.into_iter())?; 67 | let docs = prom.docs.clone(); 68 | 69 | let metrics: Vec = prom.samples.into_iter() 70 | .filter_map(|sample| { 71 | Metric::try_from(sample).ok() 72 | }) 73 | .map(|mut metric| { 74 | if let Some(help) = docs.get(&metric.name) { 75 | metric.set_help(help); 76 | } 77 | 78 | metric 79 | }) 80 | .collect(); 81 | 82 | log::debug!("Parsed {} metrics from Prometheus", metrics.len()); 83 | 84 | parquet::write(args.output, metrics) 85 | } -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use std::io::Error; 2 | 3 | fn main() { 4 | let _ = prometheus_parquet::run() 5 | .or_else::(|e| { 6 | eprintln!("{}", e); 7 | std::process::exit(1); 8 | }); 9 | } -------------------------------------------------------------------------------- /src/parquet.rs: -------------------------------------------------------------------------------- 1 | use crate::types::{Metric, RecordWriter}; 2 | 3 | use parquet::basic::{Type as PhysicalType, LogicalType, Repetition}; 4 | use parquet::schema::types::Type; 5 | use parquet::file::properties::WriterProperties; 6 | use parquet::file::writer::{FileWriter, SerializedFileWriter}; 7 | 8 | use std::error::Error; 9 | use std::fs; 10 | use std::path::PathBuf; 11 | use std::rc::Rc; 12 | 13 | pub fn write(output: PathBuf, metrics: Vec) -> Result<(), Box> { 14 | let mut fields = vec![]; 15 | fields.push( 16 | Rc::new(Type::primitive_type_builder("name", PhysicalType::BYTE_ARRAY) 17 | .with_logical_type(LogicalType::UTF8) 18 | .with_repetition(Repetition::REQUIRED) 19 | .build()? 20 | ) 21 | ); 22 | 23 | fields.push( 24 | Rc::new(Type::primitive_type_builder("help", PhysicalType::BYTE_ARRAY) 25 | .with_logical_type(LogicalType::UTF8) 26 | .build()? 27 | ) 28 | ); 29 | 30 | fields.push( 31 | Rc::new(Type::primitive_type_builder("kind", PhysicalType::BYTE_ARRAY) 32 | .with_logical_type(LogicalType::UTF8) 33 | .with_repetition(Repetition::REQUIRED) 34 | .build()? 35 | ) 36 | ); 37 | 38 | fields.push( 39 | Rc::new(Type::primitive_type_builder("labels", PhysicalType::BYTE_ARRAY) 40 | .with_logical_type(LogicalType::JSON) 41 | .with_repetition(Repetition::REQUIRED) 42 | .build()? 43 | ) 44 | ); 45 | 46 | fields.push( 47 | Rc::new(Type::primitive_type_builder("value", PhysicalType::DOUBLE) 48 | .with_repetition(Repetition::REQUIRED) 49 | .build()? 50 | ) 51 | ); 52 | 53 | let schema = Type::group_type_builder("hive_schema") 54 | .with_fields(&mut fields) 55 | .build()?; 56 | 57 | let file = fs::File::create(&output)?; 58 | 59 | let props = Rc::new( 60 | WriterProperties::builder() 61 | .set_compression(parquet::basic::Compression::GZIP) 62 | .build() 63 | ); 64 | let mut writer = SerializedFileWriter::new(file, Rc::new(schema), props)?; 65 | let mut row_group = writer.next_row_group()?; 66 | 67 | metrics.as_slice().write_to_row_group(&mut row_group); 68 | 69 | writer.close_row_group(row_group)?; 70 | writer.close()?; 71 | 72 | Ok(()) 73 | } -------------------------------------------------------------------------------- /src/types.rs: -------------------------------------------------------------------------------- 1 | use parquet::file::writer::RowGroupWriter; 2 | use parquet_derive::ParquetRecordWriter; 3 | use prometheus_parse::*; 4 | 5 | use std::collections::HashMap; 6 | use std::convert::TryFrom; 7 | use std::io; 8 | 9 | pub trait RecordWriter { 10 | fn write_to_row_group(&self, row_group_writer: &mut Box); 11 | } 12 | 13 | #[derive(Clone, Debug, ParquetRecordWriter)] 14 | pub struct Metric { 15 | pub name: String, 16 | pub help: Option, 17 | pub kind: String, 18 | pub labels: String, 19 | pub value: f64 20 | } 21 | 22 | impl Metric { 23 | pub fn set_help(&mut self, help: &str) { 24 | self.help = Some(help.to_owned()); 25 | } 26 | } 27 | 28 | impl TryFrom for Metric { 29 | type Error = io::Error; 30 | 31 | fn try_from(sample: Sample) -> Result { 32 | // Force a conversion from Sample to OurSample so we can access the inner fields 33 | // This is a huge hack but the original crate doesn't exist 34 | let (kind, value) = match sample.value { 35 | Value::Counter(ref v) => (String::from("counter"), *v), 36 | Value::Gauge(ref v) => (String::from("gauge"), *v), 37 | Value::Untyped(ref v) => (String::from("untyped"), *v), 38 | _ => { 39 | return Err(io::Error::new(io::ErrorKind::Other, "unimplemented")); 40 | } 41 | }; 42 | 43 | let map: HashMap<_, _> = sample.labels.iter().collect(); 44 | let labels = serde_json::to_string(&map)?; 45 | 46 | Ok(Metric { 47 | name: sample.metric, 48 | help: None, 49 | 50 | labels, 51 | kind, 52 | value 53 | }) 54 | } 55 | } --------------------------------------------------------------------------------