serverinfo icon indicating copy to clipboard operation
serverinfo copied to clipboard

Common interface for all statistic classes

Open PVince81 opened this issue 3 years ago • 0 comments

  • [ ] Write IStatisticsProvider interface
    • [ ] getName() to retrieve the name of the key to publish the statistics under
    • [ ] getGroup() to retrieve the name of the group key to publish the statistics under
    • [ ] getStatistics() returns the stats to retrieve
  • [ ] Write StatisticsService
    • [ ] registerStatisticsProvider(IStatisticsProvider)
    • [ ] IStatisticsProvider[] getStatisticsProviders()
  • [ ] adjust ApiController
    • [ ] receive StatisticsProvider injected instead of all the custom classes
    • [ ] query StatisticsProvider->getStatisticsProviders() and iterate and compile the stats
  • [ ] cleanup ApiControllerTest
  • [ ] rewrite the custom classes to implement IStatisticsProvider
  • [ ] register the custom classes in the application initialization

This cleantup and enhancement would also open the door to allowing third party apps to register their own statistics providers in the future.

PVince81 avatar Mar 01 '21 20:03 PVince81