forge
Explore
Log in

Don't you dare go Hollow

Tests build the store, parser and password hash crates optimized

Browse files at this commit

2b7f1c7f7ce873cf16ca1d154f6885fba0f5a61bAhmet Kaan GümüşParent: 3d78c90
  • perf
    • tests build the store, parser and password hash crates optimized
Show full message
⚡ perf: tests build the store, parser and password hash crates optimized

Every test opens a fresh store and runs the migrations through turso, and the login tests hash passwords with argon2. Unoptimized, those two dominate the suite. With opt-level 3 for them the summed test time drops from 946 s to 409 s and the workspace run from 80 s to 57 s. A nextest config adds a ci profile that writes JUnit timings.
.config/nextest.tomladded+5 -0
@@ -0,0 +1,5 @@
1+[profile.default]
2+slow-timeout = { period = "60s" }
3+
4+[profile.ci.junit]
5+path = "junit.xml"
Cargo.tomlmodified+11 -0
@@ -122,6 +122,17 @@ zip = { version = "9.0.3", default-features = false, features = ["deflate"] }
122 # self-update hashes the ~1 GB debug binary at boot; unoptimized sha2 takes ~26 s.122 # self-update hashes the ~1 GB debug binary at boot; unoptimized sha2 takes ~26 s.
123 opt-level = 3123 opt-level = 3
124 124
125+[profile.dev.package.turso_core]
126+# store migrations run through turso_core on every test's fresh store; unoptimized it is slow.
127+opt-level = 3
128+[profile.dev.package.turso_parser]
129+opt-level = 3
130+[profile.dev.package.argon2]
131+# password hashing runs unoptimized in tests and dominates the login tests.
132+opt-level = 3
133+[profile.dev.package.blake2]
134+opt-level = 3
135+
125 [profile.release]136 [profile.release]
126 lto = true137 lto = true
127 codegen-units = 1138 codegen-units = 1