diff --git a/.cargo/config.toml b/.cargo/config.toml index 3c952ce..0a0833d 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,9 @@ -# [target.x86_64-unknown-linux-gnu] -# rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/bin/mold"] +[target.x86_64-unknown-linux-gnu] +linker = "clang" +rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold"] [alias] t = "nextest run" + +[build] +target-dir = "target/target" diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 557fab3..fd359e1 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/devcontainers/rust:bookworm RUN apt-get update && \ - apt install -y build-essential xz-utils musl-tools musl-dev gcc-multilib pkg-config libssl-dev mold + apt install -y build-essential xz-utils musl-tools musl-dev gcc-multilib pkg-config libssl-dev clang mold RUN LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+') && \ curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" && \ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 402c45e..3c4eea0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -22,6 +22,11 @@ "source": "devcontainer-cargo-cache-${containerWorkspaceFolderBasename}", "target": "/usr/local/cargo", "type": "volume" + }, + { + "source": "${localWorkspaceFolderBasename}-target", + "target": "${containerWorkspaceFolder}/target", + "type": "volume" } ], // Features to add to the dev container. More info: https://containers.dev/features. @@ -56,13 +61,9 @@ "rust-lang.rust-analyzer", "mutantdino.resourcemonitor", "christian-kohler.path-intellisense", - "Swellaby.vscode-rust-test-adapter", "Gruntfuggly.todo-tree", "ms-azuretools.vscode-docker", - "redhat.vscode-yaml", - "GitHub.copilot-nightly", - "GitHub.copilot-chat" - // "GitHub.copilot" + "redhat.vscode-yaml" ] } } diff --git a/README.md b/README.md index 614eed4..be42f07 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,16 @@ Fetches and caches data from csv download and saves the data in parquet format # Dev Install ## Dev Containers -Install docker, vscode, [Remote Development Extension Pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack), and the [GitHub Repositories Extension](https://marketplace.visualstudio.com/items?itemName=GitHub.remotehub) +Install docker, vscode and the [Dev Containers Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) -`Ctrl+Shift+P` **Dev Containers: Clone Repository in Container Volume** +`git clone` -Select github then paste the url `https://github.com/NexVeridian/ark-invest-api-rust-data` +`Ctrl+Shift+P` **Dev Containers: Open Folder in Container** Run code with `F5` or `cargo run` +Run tests with `cargo t` + ## Docker Compose `git clone` diff --git a/bullseye.html b/bullseye.html deleted file mode 100644 index 3c27aec..0000000 --- a/bullseye.html +++ /dev/null @@ -1,17844 +0,0 @@ - - - - Cargo Build Timings — ark-invest-api-rust-data 0.1.0 - - - - - -

Cargo Build Timings

-See Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Targets:ark-invest-api-rust-data 0.1.0 (bin "ark-invest-api-rust-data")
Profile:dev
Fresh units:0
Dirty units:283
Total units:283
Max concurrency:6 (jobs=4 ncpu=4)
Build start:2023-06-14T09:04:44Z
Total time:192.6s (3m 12.6s)
rustc:rustc 1.69.0 (84c898d65 2023-04-16)
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Max (global) rustc threads concurrency:0
- - - - - - - - - - - - - - -
- -
- - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
UnitTotalCodegenFeatures
1.polars-core v0.30.078.4s62.8s (80%)abs, chrono, comfy-table, cross_join, cum_agg, default, docs, dtype-date, dtype-datetime, dtype-duration, dtype-struct, dtype-time, fmt, is_in, lazy, object, parquet, private, rand, rand_distr, random, regex, round_series, rows, serde_json, strings, temporal, zip_with
2.openssl-sys v0.9.88 build script (run)78.0sopenssl-src, vendored
3.zstd-sys v2.0.8+zstd.1.5.5 build script (run)57.5slegacy, std, zdict_builder
4.lz4-sys v1.9.4 build script (run)47.7s
5.arrow2 v0.17.241.1s29.2s (71%)arrow-format, base64, compute_aggregate, compute_arithmetics, compute_boolean, compute_boolean_kleene, compute_cast, compute_comparison, compute_concatenate, compute_filter, compute_if_then_else, compute_like, compute_substring, compute_take, compute_temporal, fallible-streaming-iterator, futures, io_ipc, io_ipc_compression, io_ipc_write_async, io_json_write, io_parquet, io_parquet_brotli, io_parquet_compression, io_parquet_gzip, io_parquet_lz4, io_parquet_snappy, io_parquet_zstd, lexical-core, lz4, multiversion, parquet2, regex, regex-syntax, streaming-iterator, strength_reduce, zstd
6.ark-invest-api-rust-data v0.1.0 bin "ark-invest-api-rust-data"26.3s
7.polars-io v0.30.020.8s17.6s (85%)async, async-trait, chrono, csv, dtype-date, dtype-datetime, dtype-struct, dtype-time, fast-float, futures, ipc, json, lazy, lexical, lexical-core, memmap, object, parquet, polars-json, polars-time, private, serde_json, simd-json, simdutf8, temporal, tokio
8.polars-lazy v0.30.015.6s12.1s (78%)abs, compile, cross_join, csv, cum_agg, default, dtype-date, dtype-datetime, dtype-duration, dtype-struct, dtype-time, is_in, json, log, meta, object, parquet, polars-json, polars-pipe, polars-time, private, regex, round_series, strings, temporal, trigonometry
9.polars-plan v0.30.011.5s7.8s (67%)abs, compile, cross_join, csv, cum_agg, default, dtype-date, dtype-datetime, dtype-duration, dtype-struct, dtype-time, is_in, json, log, meta, object, parquet, polars-time, private, regex, round_series, strings, temporal, trigonometry
10.tokio v1.28.29.7s4.6s (47%)bytes, default, fs, full, io-std, io-util, libc, macros, mio, net, num_cpus, parking_lot, process, rt, rt-multi-thread, signal, signal-hook-registry, socket2, sync, time, tokio-macros
11.parquet2 v0.17.28.4s6.4s (76%)async, async-stream, brotli, flate2, futures, gzip, lz4, snap, snappy, zstd
12.reqwest v0.11.188.3s6.9s (83%)__tls, blocking, default, default-tls, hyper-tls, native-tls-crate, tokio-native-tls
13.sqlparser v0.34.07.3s3.8s (53%)default, std
14.brotli v3.3.47.3s3.8s (52%)alloc-stdlib, default, ffi-api, std
15.syn v2.0.187.2s3.9s (54%)clone-impls, default, derive, full, parsing, printing, proc-macro, quote, visit-mut
16.syn v1.0.1096.7s3.2s (48%)clone-impls, default, derive, extra-traits, full, parsing, printing, proc-macro, quote, visit-mut
17.arrow-format v0.8.15.9s3.1s (52%)default, ipc, planus, serde
18.regex-syntax v0.7.25.8s3.6s (62%)default, std, unicode, unicode-age, unicode-bool, unicode-case, unicode-gencat, unicode-perl, unicode-script, unicode-segment
19.regex v1.8.45.5s3.7s (68%)aho-corasick, default, memchr, perf, perf-cache, perf-dfa, perf-inline, perf-literal, std, unicode, unicode-age, unicode-bool, unicode-case, unicode-gencat, unicode-perl, unicode-script, unicode-segment
20.polars-time v0.30.05.4s3.6s (67%)default, dtype-date, dtype-datetime, dtype-duration, dtype-time, private
21.serde_derive v1.0.1644.9sdefault
22.openssl v0.10.544.7s1.7s (36%)default, vendored
23.h2 v0.3.194.7s2.0s (43%)
24.parquet-format-safe v0.2.44.7s0.4s (8%)async, async-trait, default, futures
25.polars-ops v0.30.04.4s2.7s (61%)cross_join, dtype-date, dtype-datetime, dtype-duration, dtype-struct, log, round_series, search_sorted, strings
26.regex-syntax v0.6.294.1s2.0s (50%)default, unicode, unicode-age, unicode-bool, unicode-case, unicode-gencat, unicode-perl, unicode-script, unicode-segment
27.hyper v0.14.263.9s1.6s (41%)client, h2, http1, http2, runtime, socket2, tcp
28.serde v1.0.1643.5s0.3s (9%)alloc, default, derive, serde_derive, std
29.futures-util v0.3.283.4s0.4s (11%)alloc, async-await, async-await-macro, channel, futures-channel, futures-io, futures-macro, futures-sink, io, memchr, sink, slab, std
30.aho-corasick v1.0.22.9s1.9s (64%)default, perf-literal, std
31.simd-json v0.10.32.9s1.8s (60%)ahash, allow-non-simd, default, known-key, once_cell, serde, serde_impl, serde_json, swar-number-parsing
32.polars-arrow v0.30.02.9s1.7s (59%)compute, like, strings, temporal
33.encoding_rs v0.8.322.8s1.6s (56%)alloc, default
34.thiserror-impl v1.0.402.7s
35.rayon v1.7.02.6s0.3s (12%)
36.sysinfo v0.29.22.5s1.7s (69%)
37.strum_macros v0.24.32.4s
38.chrono v0.4.262.4s1.0s (44%)clock, default, iana-time-zone, js-sys, oldtime, serde, std, time, wasm-bindgen, wasmbind, winapi
39.polars-sql v0.30.02.3s1.5s (64%)csv, json, parquet
40.multiversion-macros v0.7.22.3sstd
41.argminmax v0.6.12.1s1.4s (70%)float
42.rayon-core v1.11.02.0s1.3s (65%)
43.serde_json v1.0.961.9s0.8s (44%)alloc, default, raw_value, std
44.brotli-decompressor v2.3.41.9s0.9s (49%)alloc-stdlib, std
45.comfy-table v6.2.01.9s0.8s (42%)crossterm, tty
46.http v0.2.91.8s0.9s (48%)
47.polars-json v0.30.01.8s1.3s (73%)
48.enum_dispatch v0.3.111.7s
49.cc v1.0.791.7s1.0s (61%)jobserver, parallel
50.lexical-util v0.8.51.6s0.1s (5%)floats, format, integers, parse, parse-floats, parse-integers, std, write, write-floats, write-integers
51.num-traits v0.2.151.6s0.3s (21%)default, libm, std
52.futures-macro v0.3.281.6s
53.openssl-sys v0.9.881.6s0.1s (8%)openssl-src, vendored
54.async-trait v0.1.681.6s
55.crossbeam-utils v0.8.161.5s0.8s (50%)default, std
56.crossterm v0.26.11.4s0.7s (52%)
57.bytemuck_derive v1.4.11.4s
58.ethnum v1.3.21.3s0.3s (22%)
59.libm v0.2.71.3s0.4s (32%)default
60.proc-macro2 v1.0.601.3s0.6s (44%)default, proc-macro
61.tokio-macros v2.1.01.2s
62.memchr v2.5.01.2s0.5s (40%)default, std
63.url v2.4.01.2s0.6s (55%)default
64.libc v0.2.146 build script1.2sdefault, std
65.proc-macro2 v1.0.60 build script1.1sdefault, proc-macro
66.unicode-bidi v0.3.131.1s0.8s (69%)hardcoded-data, std
67.miniz_oxide v0.7.11.1s0.5s (50%)with-alloc
68.rand v0.8.51.1s0.3s (26%)alloc, default, getrandom, libc, rand_chacha, small_rng, std, std_rng
69.target-features v0.1.4 build script1.0s
70.tracing-core v0.1.311.0s0.5s (53%)once_cell, std
71.async-stream-impl v0.3.51.0s
72.rustversion v1.0.121.0s
73.libc v0.2.1460.9s0.2s (16%)default, std
74.pkg-config v0.3.270.9s0.6s (67%)
75.idna v0.4.00.9s0.5s (52%)alloc, default, std
76.tinyvec v1.6.00.9s0.0s (4%)alloc, default, tinyvec_macros
77.openssl-macros v0.1.10.9s
78.mio v0.8.80.8s0.4s (44%)default, log, net, os-ext, os-poll
79.hashbrown v0.13.20.8s0.1s (7%)ahash, default, inline-more, rayon
80.tokio-util v0.7.80.8s0.3s (39%)codec, default, tracing
81.autocfg v1.1.00.8s0.3s (38%)
82.num-traits v0.2.15 build script (run)0.8sdefault, libm, std
83.ipnet v2.7.20.8s0.5s (59%)default
84.halfbrown v0.2.20.8s0.0s (6%)default, serde
85.quote v1.0.28 build script0.8sdefault, proc-macro
86.openssl-sys v0.9.88 build script0.8sopenssl-src, vendored
87.seq-macro v0.3.30.8s
88.bytes v1.4.00.8s0.3s (41%)default, std
89.crossbeam-epoch v0.9.15 build script0.7salloc, std
90.glob v0.3.10.7s0.5s (69%)
91.rand_chacha v0.3.10.7s0.5s (65%)std
92.crossbeam-channel v0.5.80.7s0.2s (32%)crossbeam-utils, default, std
93.rand_distr v0.4.30.7s0.3s (41%)alloc, default, std
94.num_cpus v1.15.00.7s0.5s (66%)
95.zstd-sys v2.0.8+zstd.1.5.5 build script0.7slegacy, std, zdict_builder
96.hashbrown v0.12.30.7s0.0s (7%)raw
97.snap v1.1.00.7s0.3s (48%)
98.indexmap v1.9.30.7s0.1s (11%)std
99.log v0.4.190.7s0.2s (32%)
100.signal-hook-registry v1.4.10.7s0.5s (71%)
101.lexical-parse-float v0.8.50.7s0.1s (21%)format, std
102.polars-row v0.30.00.7s0.3s (45%)
103.lexical-write-float v0.8.50.7s0.2s (28%)format, std
104.signal-hook v0.3.150.6s0.4s (62%)channel, default, iterator
105.unicode-normalization v0.1.220.6s0.1s (20%)std
106.parking_lot v0.12.10.6s0.4s (61%)default
107.streaming-iterator v0.1.90.6s0.0s (8%)
108.socket2 v0.4.90.6s0.3s (49%)all
109.flate2 v1.0.260.6s0.2s (31%)miniz_oxide, rust_backend
110.memoffset v0.9.0 build script0.6sdefault
111.time v0.1.450.6s0.3s (50%)
112.lz4-sys v1.9.4 build script0.6s
113.planus v0.3.10.5s0.1s (23%)default, std
114.jobserver v0.1.260.5s0.3s (47%)
115.tokio v1.28.2 build script0.5sbytes, default, fs, full, io-std, io-util, libc, macros, mio, net, num_cpus, parking_lot, process, rt, rt-multi-thread, signal, signal-hook-registry, socket2, sync, time, tokio-macros
116.xxhash-rust v0.8.60.5s0.1s (22%)xxh3
117.quote v1.0.280.5s0.2s (34%)default, proc-macro
118.crc32fast v1.3.2 build script0.5sdefault, std
119.crossbeam-epoch v0.9.150.5s0.2s (43%)alloc, std
120.futures-core v0.3.28 build script0.5salloc, default, std
121.base64 v0.21.20.5s0.2s (40%)default, std
122.version_check v0.9.40.5s0.3s (49%)
123.futures-channel v0.3.280.5s0.1s (11%)alloc, default, futures-sink, sink, std
124.libm v0.2.7 build script0.5sdefault
125.strength_reduce v0.2.40.5s0.2s (35%)
126.memchr v2.5.0 build script0.5sdefault, std
127.futures-io v0.3.280.5s0.3s (54%)std
128.syn v1.0.109 build script0.5sclone-impls, default, derive, extra-traits, full, parsing, printing, proc-macro, quote, visit-mut
129.rustversion v1.0.12 build script0.5s
130.async-trait v0.1.68 build script0.5s
131.value-trait v0.6.10.5s0.0s (10%)custom-types, default, halfbrown
132.httparse v1.8.00.5s0.2s (39%)default, std
133.parking_lot_core v0.9.80.5s0.2s (48%)
134.futures-channel v0.3.28 build script0.5salloc, default, futures-sink, sink, std
135.serde v1.0.164 build script0.5salloc, default, derive, serde_derive, std
136.snap v1.1.0 build script0.5s
137.simdutf8 v0.1.40.5s0.2s (51%)aarch64_neon, default, public_imp, std
138.futures-executor v0.3.280.5s0.3s (58%)std
139.ahash v0.8.3 build script0.4sdefault, getrandom, runtime-rng, std
140.crossbeam-utils v0.8.16 build script0.4sdefault, std
141.semver v1.0.170.4s0.1s (34%)default, std
142.mime v0.3.170.4s0.2s (52%)
143.futures-util v0.3.28 build script0.4salloc, async-await, async-await-macro, channel, futures-channel, futures-io, futures-macro, futures-sink, io, memchr, sink, slab, std
144.httparse v1.8.0 build script0.4sdefault, std
145.signal-hook v0.3.15 build script0.4schannel, default, iterator
146.parking_lot_core v0.9.8 build script0.4s
147.zstd-safe v6.0.5+zstd.1.5.4 build script0.4sarrays, legacy, std, zdict_builder
148.serde_json v1.0.96 build script0.4salloc, default, raw_value, std
149.thiserror v1.0.40 build script0.4s
150.zstd v0.12.3+zstd.1.5.20.4s0.2s (37%)arrays, default, legacy, zdict_builder
151.ahash v0.8.30.4s0.1s (21%)default, getrandom, runtime-rng, std
152.smartstring v1.0.1 build script0.4sdefault, std
153.futures-task v0.3.28 build script0.4salloc, std
154.lexical-write-integer v0.8.50.4s0.2s (41%)format, std
155.iana-time-zone v0.1.570.4s0.3s (66%)fallback
156.semver v1.0.17 build script0.4sdefault, std
157.polars-utils v0.30.00.4s0.2s (55%)sysinfo
158.native-tls v0.2.110.4s0.2s (53%)
159.lock_api v0.4.10 build script0.4satomic_usize, default
160.slab v0.4.80.4s0.0s (7%)default, std
161.num-traits v0.2.15 build script0.4sdefault, libm, std
162.float-cmp v0.9.00.4s0.0s (9%)default, num-traits, ratio
163.once_cell v1.18.00.4s0.1s (24%)alloc, default, race, std, unstable
164.ppv-lite86 v0.2.170.4s0.0s (8%)simd, std
165.native-tls v0.2.11 build script0.4s
166.smartstring v1.0.10.4s0.1s (27%)default, std
167.slab v0.4.8 build script0.4sdefault, std
168.httpdate v1.0.20.4s0.2s (56%)
169.clokwerk v0.4.00.4s0.1s (38%)async, default
170.once_cell v1.18.00.4s0.1s (33%)alloc, default, race, std
171.openssl v0.10.54 build script0.4sdefault, vendored
172.crossbeam-epoch v0.9.15 build script (run)0.3salloc, std
173.fast-float v0.2.00.3s0.1s (26%)default, std
174.rayon-core v1.11.0 build script0.3s
175.smartstring v1.0.1 build script (run)0.3sdefault, std
176.indexmap v1.9.3 build script0.3sstd
177.heck v0.4.10.3s0.1s (35%)default
178.rustc_version v0.4.00.3s0.2s (55%)
179.unicode-ident v1.0.90.3s0.1s (24%)
180.tracing v0.1.370.3s0.1s (42%)std
181.arrow2 v0.17.2 build script0.3sarrow-format, base64, compute_aggregate, compute_arithmetics, compute_boolean, compute_boolean_kleene, compute_cast, compute_comparison, compute_concatenate, compute_filter, compute_if_then_else, compute_like, compute_substring, compute_take, compute_temporal, fallible-streaming-iterator, futures, io_ipc, io_ipc_compression, io_ipc_write_async, io_json_write, io_parquet, io_parquet_brotli, io_parquet_compression, io_parquet_gzip, io_parquet_lz4, io_parquet_snappy, io_parquet_zstd, lexical-core, lz4, multiversion, parquet2, regex, regex-syntax, streaming-iterator, strength_reduce, zstd
182.openssl-src v111.26.0+1.1.1u0.3s0.2s (51%)default
183.getrandom v0.2.100.3s0.1s (43%)std
184.bytemuck v1.13.10.3s0.0s (15%)bytemuck_derive, derive
185.rand_core v0.6.40.3s0.1s (31%)alloc, getrandom, std
186.futures-task v0.3.280.3s0.1s (28%)alloc, std
187.serde_urlencoded v0.7.10.3s0.1s (21%)
188.form_urlencoded v1.2.00.3s0.1s (44%)alloc, default, std
189.polars-error v0.30.00.3s0.1s (38%)regex
190.hyper-tls v0.5.00.3s0.0s (11%)
191.percent-encoding v2.3.00.3s0.1s (51%)alloc, default, std
192.openssl-probe v0.1.50.3s0.2s (69%)
193.memmap2 v0.5.100.3s0.1s (44%)
194.polars v0.30.0 build script0.3scsv, default, docs, dtype-date, dtype-datetime, dtype-duration, dtype-slim, dtype-struct, fmt, json, lazy, lazy_regex, object, parquet, polars-io, polars-lazy, polars-sql, polars-time, round_series, strings, temporal, zip_with
195.async-stream v0.3.50.3s0.2s (55%)
196.memoffset v0.9.0 build script (run)0.3sdefault
197.target-features v0.1.40.3s0.0s (18%)
198.lz4 v1.24.00.3s0.1s (41%)
199.ryu v1.0.130.3s0.1s (36%)
200.http-body v0.4.50.3s0.0s (14%)
201.smallvec v1.10.00.3s0.0s (11%)
202.lock_api v0.4.100.3s0.0s (14%)atomic_usize, default
203.crc32fast v1.3.20.2s0.1s (41%)default, std
204.zstd-safe v6.0.5+zstd.1.5.40.2s0.1s (35%)arrays, legacy, std, zdict_builder
205.lexical-parse-integer v0.8.60.2s0.0s (14%)format, std
206.dyn-clone v1.0.110.2s0.1s (44%)
207.crossbeam-deque v0.8.30.2s0.0s (14%)crossbeam-epoch, crossbeam-utils, default, std
208.futures-core v0.3.280.2s0.1s (32%)alloc, default, std
209.adler v1.0.20.2s0.1s (48%)
210.want v0.3.00.2s0.1s (49%)
211.hash_hasher v2.0.30.2s0.0s (19%)
212.either v1.8.10.2s0.0s (6%)default, use_std
213.strum v0.24.10.2s0.0s (14%)default, std
214.home v0.5.50.2s0.1s (41%)
215.fallible-streaming-iterator v0.1.90.2s0.0s (15%)
216.zstd-sys v2.0.8+zstd.1.5.50.2s0.0s (28%)legacy, std, zdict_builder
217.lz4-sys v1.9.40.2s0.1s (41%)
218.thiserror v1.0.400.2s0.0s (26%)
219.foreign_vec v0.1.00.2s0.0s (14%)
220.memoffset v0.9.00.2s0.0s (11%)default
221.scopeguard v1.1.00.2s0.0s (17%)
222.unicode-width v0.1.100.2s0.0s (14%)default
223.tokio v1.28.2 build script (run)0.2sbytes, default, fs, full, io-std, io-util, libc, macros, mio, net, num_cpus, parking_lot, process, rt, rt-multi-thread, signal, signal-hook-registry, socket2, sync, time, tokio-macros
224.atoi v2.0.00.2s0.0s (20%)default, std
225.tokio-native-tls v0.3.10.1s0.0s (9%)
226.itoa v1.0.60.1s0.0s (12%)
227.slab v0.4.8 build script (run)0.1sdefault, std
228.lexical-core v0.8.50.1s0.0s (16%)default, floats, format, integers, lexical-parse-float, lexical-parse-integer, lexical-write-float, lexical-write-integer, parse, parse-floats, parse-integers, std, write, write-floats, write-integers
229.tower-service v0.3.20.1s0.0s (22%)
230.alloc-no-stdlib v2.0.40.1s0.0s (22%)
231.signal-hook-mio v0.2.30.1s0.0s (27%)mio-0_8, support-v0_8
232.lock_api v0.4.10 build script (run)0.1satomic_usize, default
233.futures-sink v0.3.280.1s0.0s (15%)alloc, default, std
234.pin-utils v0.1.00.1s0.0s (17%)
235.ahash v0.8.3 build script (run)0.1sdefault, getrandom, runtime-rng, std
236.alloc-stdlib v0.2.20.1s0.0s (13%)
237.quote v1.0.28 build script (run)0.1sdefault, proc-macro
238.now v0.1.30.1s0.0s (9%)
239.try-lock v0.2.40.1s0.0s (15%)
240.proc-macro2 v1.0.60 build script (run)0.1sdefault, proc-macro
241.streaming-decompression v0.1.20.1s0.0s (30%)
242.static_assertions v1.1.00.1s0.0s (12%)
243.lexical v6.1.10.1s0.0s (22%)integers, parse, parse-integers, std
244.libc v0.2.146 build script (run)0.1sdefault, std
245.multiversion v0.7.20.1s0.0s (33%)default, std
246.polars v0.30.00.1s0.0s (10%)csv, default, docs, dtype-date, dtype-datetime, dtype-duration, dtype-slim, dtype-struct, fmt, json, lazy, lazy_regex, object, parquet, polars-io, polars-lazy, polars-sql, polars-time, round_series, strings, temporal, zip_with
247.arrow2 v0.17.2 build script (run)0.1sarrow-format, base64, compute_aggregate, compute_arithmetics, compute_boolean, compute_boolean_kleene, compute_cast, compute_comparison, compute_concatenate, compute_filter, compute_if_then_else, compute_like, compute_substring, compute_take, compute_temporal, fallible-streaming-iterator, futures, io_ipc, io_ipc_compression, io_ipc_write_async, io_json_write, io_parquet, io_parquet_brotli, io_parquet_compression, io_parquet_gzip, io_parquet_lz4, io_parquet_snappy, io_parquet_zstd, lexical-core, lz4, multiversion, parquet2, regex, regex-syntax, streaming-iterator, strength_reduce, zstd
248.fnv v1.0.70.1s0.0s (26%)default, std
249.array-init-cursor v0.2.00.1s0.0s (10%)
250.pin-project-lite v0.2.90.1s0.0s (16%)
251.async-trait v0.1.68 build script (run)0.1s
252.foreign-types-shared v0.1.10.1s0.0s (9%)
253.polars-pipe v0.30.00.1s0.0s (9%)cross_join, csv, parquet
254.cfg-if v1.0.00.1s0.0s (14%)
255.tinyvec_macros v0.1.10.1s0.0s (8%)
256.crc32fast v1.3.2 build script (run)0.1sdefault, std
257.futures v0.3.280.1s0.0s (10%)alloc, async-await, default, executor, futures-executor, std
258.thiserror v1.0.40 build script (run)0.1s
259.bitflags v1.3.20.1s0.0s (10%)default
260.foreign-types v0.3.20.1s0.0s (15%)
261.serde v1.0.164 build script (run)0.1salloc, default, derive, serde_derive, std
262.rustversion v1.0.12 build script (run)0.1s
263.polars v0.30.0 build script (run)0.1scsv, default, docs, dtype-date, dtype-datetime, dtype-duration, dtype-slim, dtype-struct, fmt, json, lazy, lazy_regex, object, parquet, polars-io, polars-lazy, polars-sql, polars-time, round_series, strings, temporal, zip_with
264.semver v1.0.17 build script (run)0.1sdefault, std
265.syn v1.0.109 build script (run)0.1sclone-impls, default, derive, extra-traits, full, parsing, printing, proc-macro, quote, visit-mut
266.serde_json v1.0.96 build script (run)0.1salloc, default, raw_value, std
267.target-features v0.1.4 build script (run)0.0s
268.signal-hook v0.3.15 build script (run)0.0schannel, default, iterator
269.futures-util v0.3.28 build script (run)0.0salloc, async-await, async-await-macro, channel, futures-channel, futures-io, futures-macro, futures-sink, io, memchr, sink, slab, std
270.snap v1.1.0 build script (run)0.0s
271.zstd-safe v6.0.5+zstd.1.5.4 build script (run)0.0sarrays, legacy, std, zdict_builder
272.futures-core v0.3.28 build script (run)0.0salloc, default, std
273.indexmap v1.9.3 build script (run)0.0sstd
274.futures-task v0.3.28 build script (run)0.0salloc, std
275.crossbeam-utils v0.8.16 build script (run)0.0sdefault, std
276.libm v0.2.7 build script (run)0.0sdefault
277.futures-channel v0.3.28 build script (run)0.0salloc, default, futures-sink, sink, std
278.openssl v0.10.54 build script (run)0.0sdefault, vendored
279.memchr v2.5.0 build script (run)0.0sdefault, std
280.httparse v1.8.0 build script (run)0.0sdefault, std
281.parking_lot_core v0.9.8 build script (run)0.0s
282.rayon-core v1.11.0 build script (run)0.0s
283.native-tls v0.2.11 build script (run)0.0s
- - - diff --git a/src/util.rs b/src/util.rs index c99f3ae..6338d32 100644 --- a/src/util.rs +++ b/src/util.rs @@ -6,8 +6,9 @@ use polars::prelude::{DataFrame, StrptimeOptions, UniqueKeepStrategy}; use reqwest::blocking::Client; use serde_json::Value; use std::error::Error; -use std::fs::File; +use std::fs::{create_dir_all, File}; use std::io::Cursor; +use std::path::{Path, PathBuf}; use std::result::Result; use strum_macros::EnumIter; @@ -157,7 +158,12 @@ impl Ark { } fn write_df_parquet(path: String, df: DF) -> Result<(), Box> { - ParquetWriter::new(File::create(path)?).finish(&mut df.collect()?)?; + if let Some(parent) = Path::new(&path).parent() { + if !parent.exists() { + create_dir_all(parent)?; + } + } + ParquetWriter::new(File::create(&path)?).finish(&mut df.collect()?)?; Ok(()) }