Browse Source

debug log

tags/v1.22.1.1
lewis 3 years ago
parent
commit
ed5cfca021
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      routers/repo/issue.go

+ 5
- 0
routers/repo/issue.go View File

@@ -13,6 +13,7 @@ import (
"net/http"
"strconv"
"strings"
"time"

"code.gitea.io/gitea/models"
"code.gitea.io/gitea/modules/auth"
@@ -336,6 +337,7 @@ func issues(ctx *context.Context, milestoneID int64, isPullOption util.OptionalB

// Issues render issues page
func Issues(ctx *context.Context) {
startTime := time.Now()
isPullList := ctx.Params(":type") == "pulls"
if isPullList {
MustAllowPulls(ctx)
@@ -366,6 +368,9 @@ func Issues(ctx *context.Context) {

ctx.Data["CanWriteIssuesOrPulls"] = ctx.Repo.CanWriteIssuesOrPulls(isPullList)

duration := time.Since(startTime)
log.Info("Issues cost: %v seconds", duration.Seconds())

ctx.HTML(200, tplIssues)
}



Loading…
Cancel
Save