-
Notifications
You must be signed in to change notification settings - Fork 0
feat: phase 22 — performance baselines completion #355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d76a624
b0eec83
e0ce3c6
8818032
107823d
8da4fc9
36f835b
6f458d7
d4dacae
5a86234
01d1104
868f610
1fc6cf6
0f60e0a
7cbed45
ee8621d
17ecf67
afb70e3
b7fb166
94fb2cb
ad41d8e
128e8f2
7f0bcf8
664f758
e730262
0d65774
b778925
fd80a77
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -3,12 +3,12 @@ gsd_state_version: 1.0 | |||||
| milestone: v1.1 | ||||||
| milestone_name: milestone | ||||||
| status: unknown | ||||||
| last_updated: '2026-03-25T01:34:07.674Z' | ||||||
| last_updated: '2026-03-25T01:50:49.360Z' | ||||||
| progress: | ||||||
| total_phases: 8 | ||||||
| completed_phases: 7 | ||||||
| total_plans: 39 | ||||||
| completed_plans: 39 | ||||||
| completed_phases: 8 | ||||||
| total_plans: 42 | ||||||
| completed_plans: 42 | ||||||
| --- | ||||||
|
|
||||||
| # Project State | ||||||
|
|
@@ -18,12 +18,12 @@ progress: | |||||
| See: .planning/PROJECT.md (updated 2026-03-07) | ||||||
|
|
||||||
| **Core value:** Zero-knowledge privacy -- files encrypted client-side, server never sees plaintext | ||||||
| **Current focus:** Phase 21 — byo-ipfs-node-support | ||||||
| **Current focus:** Phase 22 — performance-baselines-completion (complete) | ||||||
|
|
||||||
| ## Current Position | ||||||
|
|
||||||
| Phase: 21 (byo-ipfs-node-support) — EXECUTING | ||||||
| Plan: 4 of 4 | ||||||
| Phase: 22 (performance-baselines-completion) — COMPLETE | ||||||
| Plan: 3 of 3 (COMPLETE) | ||||||
|
|
||||||
| ## Performance Metrics | ||||||
|
|
||||||
|
|
@@ -70,6 +70,9 @@ Plan: 4 of 4 | |||||
| | 21 | 10 | 5min | 2 | 7 | | ||||||
| | 21 | 09 | 9min | 3 | 17 | | ||||||
| | 21 | 11 | 12min | 2 | 3 | | ||||||
| | 22 | 02 | 4min | 2 | 2 | | ||||||
| | 22 | 01 | 8min | 2 | 7 | | ||||||
| | 22 | 03 | 8min | 2 | 8 | | ||||||
|
|
||||||
| ## Accumulated Context | ||||||
|
|
||||||
|
|
@@ -139,6 +142,8 @@ Recent for v1.1: | |||||
| - pinWithMode treats Pinata like Kubo: direct upload bypasses CipherBox relay entirely | ||||||
| - Connection test probe order updated: Kubo -> Pinata -> PSA; pinata.cloud URLs skip Kubo probe | ||||||
| - BYO Pinata baselines: pin p50=2.0s (+47% vs local Kubo), tail latency p99 13.5% better, 98% CipherBox API load reduction per file | ||||||
| - perf.ts PERF_ENABLED evaluated once at module load (zero overhead in production); **CIPHERBOX_PERF** global for opt-in production debugging | ||||||
| - Load test thresholds set at 2-3x observed baselines; spike test most generous (15s/15%); vitest expect() for CI failure on breach | ||||||
|
||||||
| - Load test thresholds set at 2-3x observed baselines; spike test most generous (15s/15%); vitest expect() for CI failure on breach | |
| - Load test thresholds set at 2-3x observed baselines; spike test most generous (15s/15%); enforced via expectThresholdsPassed(...) which logs violations and throws on breach to fail CI |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| # Performance Baselines - Phase 22 (Journey Timing) | ||
|
|
||
| > End-to-end user journey timing captured via Playwright with real browser rendering. | ||
| > Timings include network, crypto, IPFS operations, and browser paint. | ||
|
|
||
| ## Capture Information | ||
|
|
||
| | Field | Value | | ||
| | ---------------- | ------------------------------------------------------------ | | ||
| | **Capture Date** | 2026-03-25 | | ||
| | **Environment** | Staging (api-staging.cipherbox.cc, app-staging.cipherbox.cc) | | ||
| | **Browser** | Chromium (Playwright managed, headless) | | ||
| | **Auth Method** | Mock wallet (EIP-1193 via @johanneskares/wallet-mock) | | ||
| | **Test File** | `tests/web-e2e/tests/journey-timing.spec.ts` | | ||
| | **API Version** | v0.27.0 (staging-cipher-box-v0.27.0-rc-1) | | ||
| | **VPS** | 4 vCPU, 8GB RAM (Hostinger) | | ||
|
|
||
| ## Journey 1: Login-to-Vault | ||
|
|
||
| Measures wall-clock time from clicking the wallet login button through vault metadata loading and file list rendering. | ||
|
|
||
| | Phase | Duration | | ||
| | --------------- | -------- | | ||
| | **Wallet Auth** | 23,483ms | | ||
| | **Vault Load** | 86ms | | ||
| | **Total** | 23,569ms | | ||
|
|
||
| Includes: Core Kit initialization wait, mock wallet connect, SIWE signature, backend JWT exchange, vault metadata IPNS resolve, file list React render. | ||
|
|
||
| **Note:** Wallet auth dominates at 99.6% of total time. This is Web3Auth Core Kit MPC initialization + Sapphire Devnet DKG key generation for a brand-new identity. Repeat logins (existing identity) are expected to be significantly faster (5-10s). | ||
|
|
||
| ## Journey 2: Upload-to-Visible | ||
|
|
||
| Measures wall-clock time from file input selection through the file appearing in the file list UI. | ||
|
|
||
| | Metric | Value | | ||
| | ------------------ | ------- | | ||
| | **File Size** | 100KB | | ||
| | **Total Duration** | 1,355ms | | ||
|
|
||
| Includes: AES-256-GCM encryption, IPFS ciphertext upload (pin), IPFS metadata upload (pin), IPNS file publish, folder metadata update, IPNS folder publish, React state update, file list re-render. | ||
|
|
||
| ## Journey 3: Share-to-Accessible | ||
|
|
||
| Measures wall-clock time from Alice initiating a share through Bob seeing the shared item in the Shared section. | ||
|
|
||
| | Phase | Duration | | ||
| | -------------------------- | -------- | | ||
| | **Share Create (Alice)** | 2,236ms | | ||
| | **Recipient Access (Bob)** | 803ms | | ||
| | **Total** | 3,039ms | | ||
|
|
||
| Includes: ECIES key wrapping for recipient, share key API call, share dialog UI interaction, Bob's navigation to Shared section, share list API fetch, shared item rendering. | ||
|
|
||
| ## Raw Data | ||
|
|
||
| ```text | ||
| JOURNEY_TIMING: {"journey":"login-to-vault","totalMs":23569,"phases":{"walletAuthMs":23483,"vaultLoadMs":86}} | ||
| JOURNEY_TIMING: {"journey":"upload-to-visible","totalMs":1355,"fileSizeBytes":102400} | ||
| JOURNEY_TIMING: {"journey":"share-to-accessible","totalMs":3039,"phases":{"shareCreateMs":2236,"recipientAccessMs":803}} | ||
| JOURNEY_TIMING: {"summary":true,"capturedAt":"2026-03-25T02:58:23.753Z","journeys":[{"journey":"login-to-vault","totalMs":23569,"phases":{"walletAuthMs":23483,"vaultLoadMs":86}},{"journey":"upload-to-visible","totalMs":1355,"fileSizeBytes":102400},{"journey":"share-to-accessible","totalMs":3039,"phases":{"shareCreateMs":2236,"recipientAccessMs":803}}]} | ||
| ``` | ||
|
|
||
| ## How to Recapture | ||
|
|
||
| Run the journey timing tests against staging: | ||
|
|
||
| ```bash | ||
| cd tests/web-e2e && npx playwright test journey-timing.spec.ts --config /tmp/pw-staging.config.ts | ||
| ``` | ||
|
|
||
| Or against localhost with API + frontend running: | ||
|
|
||
| ```bash | ||
| cd tests/web-e2e && pnpm exec playwright test tests/journey-timing.spec.ts | ||
| ``` | ||
|
|
||
| The test outputs structured JSON on each line prefixed with `JOURNEY_TIMING:`. The final summary line contains all journey results in a single JSON object. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The state summary references a CIPHERBOX_PERF global flag, but the actual opt-in flag used by sdk-core perf gating is
globalThis.__CIPHERBOX_PERF__(double-underscore). This mismatch will mislead anyone trying to enable perf marks in production/debug builds; please update the flag name here to match the implementation.