Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tirex-status does not display statistics for all configured zoom levels #28

Open
stephankn opened this issue May 13, 2021 · 3 comments
Open

Comments

@stephankn
Copy link
Contributor

stephankn commented May 13, 2021

I have a map configured with maxz=20. tirex-status does not display any statistics for zoom larger 17 until some tiles are rendered.

Expectation is that a 0 is displayed also for higher zoom levels up to maxz.

 Statistics:
  count_error=0
  count_expired=0
  count_rendered[osm]=0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 4, 478, 3
  count_requested=501
  count_timeouted=0
  sum_render_time[osm]=0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.111, 0, 0.815, 8.057, 8.050, 37.050, 2:24:20.754, 27.504
@stephankn
Copy link
Contributor Author

Here a structure is initialized, but this part does not know about maps.
Should it fetch configured maps and initialize full structure with 0? This might probably fix #29 as well.

$self->{'stats'} = {

Does this location sound right? Is there any concern not exposing map configuration at this place?

@woodpeck
Copy link
Collaborator

I guess it can be changed and there's no architectural reason not to. However the list is rather unreadable as it is, and adding more zeroes to it will probably not improve that. Maybe a drastically different approach is needed if you actually want the statistics to be useful - e.g. opening a web port and outputting HTML there.

(For a halfway sane output of timings try tirex-status -t.)

@stephankn
Copy link
Contributor Author

I would have to double-check again, but after reading the code I think the list is not initialized at all, so zeros will appear as soon as a higher level render job is done and statistic updated.

I agree with the point of readability. The statistics section in interactive mode might benefit from a rework to format both count_rendered and sum_render_time in a similar way than with the -t option.
This would be another task.

For regular monitoring I feed the JSON output into Zabbix and fetch individual items with JSONPath on discovered maps with e.g. $.rm.stats.count_rendered.{#TIREXMAP}[11]. That is the part where missing entries will break the reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants