final stats

This commit is contained in:
NatureFreshMilk 2019-01-22 13:53:11 +01:00
parent a6e1eff1d0
commit a38d3724db

View File

@ -17,6 +17,8 @@ func Job(ctx *app.App) {
fields := logrus.Fields{} fields := logrus.Fields{}
logrus.WithFields(fields).Info("Starting initial rendering") logrus.WithFields(fields).Info("Starting initial rendering")
blockcount := 0
tilecount := 0
rstate := ctx.Config.RenderState rstate := ctx.Config.RenderState
@ -32,13 +34,18 @@ func Job(ctx *app.App) {
} }
if len(mblist) == 0 && !hasMore { if len(mblist) == 0 && !hasMore {
logrus.Info("Initial rendering complete") fields = logrus.Fields{
"blocks": blockcount,
"tiles": tilecount,
}
logrus.WithFields(fields).Info("Initial rendering complete")
rstate.InitialRun = false rstate.InitialRun = false
ctx.Config.Save() ctx.Config.Save()
break break
} }
blockcount += len(mblist)
lastcoords = *newlastcoords lastcoords = *newlastcoords
tileRenderedMap := make(map[string]bool) tileRenderedMap := make(map[string]bool)
@ -67,6 +74,7 @@ func Job(ctx *app.App) {
} }
logrus.WithFields(fields).Debug("Dispatching tile rendering (z11-1)") logrus.WithFields(fields).Debug("Dispatching tile rendering (z11-1)")
tilecount++
ctx.Objectdb.RemoveTile(tc) ctx.Objectdb.RemoveTile(tc)
_, err = ctx.Tilerenderer.Render(tc, 1) _, err = ctx.Tilerenderer.Render(tc, 1)
if err != nil { if err != nil {