Open stephankn opened 3 years ago
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.
Does this location sound right? Is there any concern not exposing map configuration at this place?
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.)
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.
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.