diff options
author | Jakob Borg <jakob@kastelo.net> | 2023-01-31 09:11:15 +0100 |
---|---|---|
committer | Jakob Borg <jakob@kastelo.net> | 2023-01-31 09:11:15 +0100 |
commit | 966e9f9a685d519190d0bdf0d8e95a47698797b0 (patch) | |
tree | 0379f2292b38c96c330a5f1903c18a7d0943699d | |
parent | b10e11abb79d17be0180012bc17000964b7a3865 (diff) |
cmd/ursrv: Harmonize timespan of charts
-rw-r--r-- | cmd/ursrv/main.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/ursrv/main.go b/cmd/ursrv/main.go index 4c882d6436..48b273d263 100644 --- a/cmd/ursrv/main.go +++ b/cmd/ursrv/main.go @@ -1022,7 +1022,7 @@ func (s *summary) filter(min int) { func getSummary(db *sql.DB, min int) (summary, error) { s := newSummary() - rows, err := db.Query(`SELECT Day, Version, Count FROM VersionSummary WHERE Day > now() - '2 year'::INTERVAL;`) + rows, err := db.Query(`SELECT Day, Version, Count FROM VersionSummary WHERE Day > now() - '3 year'::INTERVAL;`) if err != nil { return summary{}, err } @@ -1055,7 +1055,7 @@ func getSummary(db *sql.DB, min int) (summary, error) { } func getMovement(db *sql.DB) ([][]interface{}, error) { - rows, err := db.Query(`SELECT Day, Added, Removed, Bounced FROM UserMovement WHERE Day > now() - '2 year'::INTERVAL ORDER BY Day`) + rows, err := db.Query(`SELECT Day, Added, Removed, Bounced FROM UserMovement WHERE Day > now() - '3 year'::INTERVAL ORDER BY Day`) if err != nil { return nil, err } @@ -1088,7 +1088,7 @@ func getMovement(db *sql.DB) ([][]interface{}, error) { } func getPerformance(db *sql.DB) ([][]interface{}, error) { - rows, err := db.Query(`SELECT Day, TotFiles, TotMiB, SHA256Perf, MemorySize, MemoryUsageMiB FROM Performance WHERE Day > '2014-06-20'::TIMESTAMP ORDER BY Day`) + rows, err := db.Query(`SELECT Day, TotFiles, TotMiB, SHA256Perf, MemorySize, MemoryUsageMiB FROM Performance WHERE Day > now() - '5 year'::INTERVAL ORDER BY Day`) if err != nil { return nil, err } @@ -1115,7 +1115,7 @@ func getPerformance(db *sql.DB) ([][]interface{}, error) { } func getBlockStats(db *sql.DB) ([][]interface{}, error) { - rows, err := db.Query(`SELECT Day, Reports, Pulled, Renamed, Reused, CopyOrigin, CopyOriginShifted, CopyElsewhere FROM BlockStats WHERE Day > '2017-10-23'::TIMESTAMP ORDER BY Day`) + rows, err := db.Query(`SELECT Day, Reports, Pulled, Renamed, Reused, CopyOrigin, CopyOriginShifted, CopyElsewhere FROM BlockStats WHERE Day > now() - '3 year'::INTERVAL ORDER BY Day`) if err != nil { return nil, err } |