Skip to content

Commit

Permalink
removed unused stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopertz committed Sep 9, 2024
1 parent 2dd8ab4 commit d09cb39
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions cmd/api/main.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
package main

import (
"expvar"
"flag"
"log/slog"
"os"
"runtime"
"sync"
"time"

"api.swahilichess.com/config"
db "api.swahilichess.com/internal/db/sqlc"
Expand Down Expand Up @@ -59,17 +56,6 @@ func main() {
defer conn.Close()
slog.Info("database connection pool established")

expvar.NewString("version").Set(version)
expvar.Publish("goroutines", expvar.Func(func() interface{} {
return runtime.NumGoroutine()
}))
expvar.Publish("database", expvar.Func(func() interface{} {
return conn.Stats()
}))
expvar.Publish("timestamp", expvar.Func(func() interface{} {
return time.Now().Unix()
}))

app := &application{
config: cfg,
store: db.NewStore(conn),
Expand Down

0 comments on commit d09cb39

Please sign in to comment.