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

Cache statistics and provide estimation methods #19474

Closed
wants to merge 17 commits into from

Commits on Apr 23, 2022

  1. Cache statistics and provide estimation methods

    Currently whenever the prometheus metrics endpoint or `/admin` endpoint are viewed
    the statistics are recalculated immediately - using COUNT rather than a less expensive
    method.
    
    This PR provides a mechanism to cache these statistics, avoids generating all of the
    metrics on the admin page and provides an estimation method for the plain table counts.
    
    Fix go-gitea#17506
    
    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Apr 23, 2022
    Configuration menu
    Copy the full SHA
    2892d1c View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2022

  1. cache results locally instead of using the cache service and

    ensure that statistics are only calculated one at a time.
    
    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Apr 24, 2022
    Configuration menu
    Copy the full SHA
    7b3974f View commit details
    Browse the repository at this point in the history
  2. more estimates

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Apr 24, 2022
    Configuration menu
    Copy the full SHA
    d487e08 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2022

  1. Configuration menu
    Copy the full SHA
    6494a08 View commit details
    Browse the repository at this point in the history
  2. placate lint

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Apr 25, 2022
    Configuration menu
    Copy the full SHA
    a9026aa View commit details
    Browse the repository at this point in the history

Commits on May 4, 2022

  1. Configuration menu
    Copy the full SHA
    52cd751 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2022

  1. Configuration menu
    Copy the full SHA
    2c42857 View commit details
    Browse the repository at this point in the history
  2. Only provide estimates

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed May 6, 2022
    Configuration menu
    Copy the full SHA
    f3e881d View commit details
    Browse the repository at this point in the history

Commits on May 19, 2022

  1. Configuration menu
    Copy the full SHA
    3316ecc View commit details
    Browse the repository at this point in the history

Commits on May 21, 2022

  1. Configuration menu
    Copy the full SHA
    89e1a54 View commit details
    Browse the repository at this point in the history
  2. fix mismerge

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed May 21, 2022
    Configuration menu
    Copy the full SHA
    aa64b2c View commit details
    Browse the repository at this point in the history

Commits on May 22, 2022

  1. Configuration menu
    Copy the full SHA
    bc23fad View commit details
    Browse the repository at this point in the history
  2. reduce the number of estimated counts and clearly mark them

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed May 22, 2022
    Configuration menu
    Copy the full SHA
    da9579d View commit details
    Browse the repository at this point in the history
  3. as per review

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed May 22, 2022
    Configuration menu
    Copy the full SHA
    27f8b14 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2022

  1. Configuration menu
    Copy the full SHA
    1a7c426 View commit details
    Browse the repository at this point in the history
  2. add examples to app.example.ini

    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Aug 13, 2022
    Configuration menu
    Copy the full SHA
    626d23f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    123024f View commit details
    Browse the repository at this point in the history