Skip to content

Conversation

@Xendergo
Copy link
Collaborator

@Xendergo Xendergo commented Nov 1, 2025

Closes #50

MVP

  • Rewrite my old statistics tracking code to only store data for the current day in memory; replacing the data whenever a new day is observed using atomic trickery (ce14147)
  • Output the statistics data into a writer in CSV format (9262c9e)
  • Research compression formats that supports being appended to and use one of them to write to a statistics file on disk

Important but maybe a future PR

  • Allow people to download the data from the website
  • Send a "weekly update" in the webring channel with statistics aggregated over the week

@Xendergo Xendergo requested a review from kdkasad November 1, 2025 22:36
@codecov
Copy link

codecov bot commented Nov 1, 2025

Codecov Report

❌ Patch coverage is 84.12698% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.23%. Comparing base (01cebcf) to head (93d5271).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/stats/mod.rs 84.29% 18 Missing and 1 partial ⚠️
src/webring.rs 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
- Coverage   86.69%   86.23%   -0.46%     
==========================================
  Files           8        8              
  Lines        2533     2609      +76     
  Branches     2533     2609      +76     
==========================================
+ Hits         2196     2250      +54     
- Misses        296      317      +21     
- Partials       41       42       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions
Copy link

github-actions bot commented Nov 1, 2025

Test Results

46 tests   46 ✅  1s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit 93d5271.

♻️ This comment has been updated with latest results.

@Xendergo Xendergo force-pushed the push-qmlprytlpuvp branch 2 times, most recently from b0b2e08 to 876fb25 Compare November 1, 2025 23:01
@kdkasad kdkasad force-pushed the master branch 2 times, most recently from 969ee51 to 93638aa Compare November 19, 2025 00:01
@kdkasad
Copy link
Collaborator

kdkasad commented Nov 25, 2025

Why not export metrics in OTel or Prometheus format so we can integrate with dashboards?

@Xendergo
Copy link
Collaborator Author

I don't know anything about either of those; could you point me to what I should read?

@kdkasad
Copy link
Collaborator

kdkasad commented Nov 26, 2025

I don't know anything about either of those; could you point me to what I should read?

Both are systems for collecting/processing metrics from software.

Prometheus: https://prometheus.io/docs/introduction/overview/

OpenTelemetry (intro): https://opentelemetry.io/docs/what-is-opentelemetry/
OpenTelemetry (for devs): https://opentelemetry.io/docs/getting-started/dev/

Originally the plan was to add Prometheus metrics to collect standard performance/behavior metrics about the process, but it sounded like you wanted to collect other statistics (more like user behavior) so I left that up to you.

We did also discuss Prometheus a little in Discord: https://discord.com/channels/772576325897945119/1319140464812753009/1373470039478370385

Basically it boils down to a standard format for exporting metrics so we can use existing software to collect/process/display the data instead of having to re-implement all of that. There are also application-side libraries for Prometheus (and I assume OTel too) that make it easy to calculate and export more complex metrics like histograms of response latencies.

@Xendergo
Copy link
Collaborator Author

Ok sick, I will look into those, though I'm highkey locked in for spill so I may look at that over the winter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Finish implementation of statistics

3 participants