Add timing endpoint (timeline data) for stats (#1157)

This commit is contained in:
gadotroee
2022-06-21 14:33:04 +03:00
committed by GitHub
parent f9a9c05f48
commit 9a40895e9c
4 changed files with 173 additions and 36 deletions

View File

@@ -83,6 +83,11 @@ func GetAccumulativeStats(c *gin.Context) {
c.JSON(http.StatusOK, providers.GetAccumulativeStats())
}
func GetAccumulativeStatsTiming(c *gin.Context) {
// for now hardcoded 10 bars of 5 minutes interval
c.JSON(http.StatusOK, providers.GetAccumulativeStatsTiming(300, 10))
}
func GetCurrentResolvingInformation(c *gin.Context) {
c.JSON(http.StatusOK, holder.GetResolver().GetMap())
}