Skip to content
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

UsageSurvey #990

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

UsageSurvey #990

wants to merge 1 commit into from

Conversation

SteveMicroNova
Copy link
Contributor

What does this change intend to accomplish?

Creating an opt-in device usage survey that will gather statistics about what streams are used and how often, as well as a few hardware statistics that can be used by our dev team to better prioritize bugs and improve features, and by our marketing team to find what's a hit with customers

Currently in a very early state, I don't even know what file these basemodels belong in yet or if they should even be part of AmpliPi proper or be more akin to the usb drive mounting and be more of a subprocess off to the side

Checklist

  • Have you tested your changes and ensured they work?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • If applicable, have you updated the documentation/manual?
  • If applicable, have you updated the CHANGELOG?
  • Does your submission pass linting & tests? You can test on localhost using ./scripts/test
  • Have you written new tests for your core features/changes, as applicable?
  • If this is a UI change, have you tested it across multiple browser platforms on both desktop and mobile?

Comment on lines +144 to +147
# The length in seconds of longest-connected instance within the survey cycle, maxing out after 24 hours. Is not additive with multiple concurrent streams.
runtime_polls: int = 0 # Used to calculate average
average_runtime: Annotated[int, Field(ge=0, le=86400)] = 0
peak_runtime: Annotated[int, Field(ge=0, le=86400)] = 0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For runtime, I've got two ideas for measuring:

  1. Measure it by recording the time when a stream starts and recording again when it stops and splitting the difference
  2. Have a regularly repeated polling function that just records when a given stream and gives a rough number divisible by the 5-10 minute intervals that that polling function is ran, as specificity isn't important and this doesn't require as many stored variables but does require more than 2 polling instances per stream

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.

1 participant