You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.
It appears that grafonnet-lib has an issue when generating larger dashboards without the row elements for Grafana 5 and 6.
As the jsonnet source file becomes larger (e.g. more addPanel fields), the jsonnet execution time gets increasingly slower, up to a point of it apparently hanging wile using all of the CPU until interrupted.
Used Grafana 5 example dashboard from the Readme as a test case.
# As-is from the Readme (some addTemplate blocks and 1 addPanel)
$> time jsonnet -J /path/to/grafonnet-lib example.jsonnet -o example.json
real 0m0.179s
user 0m0.163s
sys 0m0.014s
# With 15 addPanel blocks copy/pasted
real 0m2.439s
user 0m2.406s
sys 0m0.021s
# With 20 addPanel blocks
real 1m38.843s
user 1m36.830s
sys 0m0.267s
# With 30 addPanel blocks
(interrupted after)
real 3m59.107s
user 3m52.272s
sys 0m0.766s
Strangely, this issue is not evident, if enclosing all of these addPanel fields in an addRow field:
# Same 30 addPanels, but inside an addRow:
$> time jsonnet -J /path/to/grafonnet-lib example.jsonnet -o example.json
real 0m0.268s
user 0m0.240s
sys 0m0.018s
Using addRow, however, does not really fix anything. The row implementation changed in Grafana 5 with the introduction of "flexible grid". It appears that grafonnet-lib would still generate pre-Grafana 5 row structure (even with schemaVersion >=16), which cannot be properly imported into Grafana 5/6. When using schemaVersion <16, the resulting dashboard, when imported, does not take into account the specified gridPos directives.
Is this an issue with my approach or grafonnet-lib itself?
The text was updated successfully, but these errors were encountered:
It appears that grafonnet-lib has an issue when generating larger dashboards without the row elements for Grafana 5 and 6.
As the jsonnet source file becomes larger (e.g. more
addPanel
fields), thejsonnet
execution time gets increasingly slower, up to a point of it apparently hanging wile using all of the CPU until interrupted.Used Grafana 5 example dashboard from the Readme as a test case.
Strangely, this issue is not evident, if enclosing all of these
addPanel
fields in anaddRow
field:Using
addRow
, however, does not really fix anything. The row implementation changed in Grafana 5 with the introduction of "flexible grid". It appears that grafonnet-lib would still generate pre-Grafana 5 row structure (even withschemaVersion >=16
), which cannot be properly imported into Grafana 5/6. When usingschemaVersion <16
, the resulting dashboard, when imported, does not take into account the specifiedgridPos
directives.Is this an issue with my approach or grafonnet-lib itself?
The text was updated successfully, but these errors were encountered: