Skip to content

Conversation

@NoctivagusObitus
Copy link
Contributor

depending on the configuration there may be multiple interfaces creating multiple time series always
reporting 0 value. omiting them from the export saves resources. most notably cpu.

  • remove time series with value of zero
  • make 'omit_zero_values' configurable
  • formating accoding to shfmt and stylua

Signed-off-by: Markus Hube [email protected]

@NoctivagusObitus
Copy link
Contributor Author

@champtar may I kindly ask if you could have a look at this? I would be happy to change the pull request given you have concerns.

@rwrnet
Copy link

rwrnet commented Feb 18, 2025

@champtar has this any chance to be merged? Like to have this option too.

@NoctivagusObitus
Copy link
Contributor Author

@1715173329 do you think we may get this merged? I would be happy to rework the pr as offered here if so desired.

@1715173329
Copy link
Member

I'm neither the maintainer of this package nor familiar with it, sorry for that.
But at least, please bump PKG_RELEASE, and split your commits. One commit for adding omit_zero_values option, and another for style fixes.

@champtar kindly ping

@NoctivagusObitus NoctivagusObitus force-pushed the feature_omit_zero_export branch 3 times, most recently from 640d1e4 to 9237ffb Compare April 13, 2025 08:25
@NoctivagusObitus
Copy link
Contributor Author

Sure. I am aware that your are not the maintainer and that you will not do the review or merge. Still thank you for your fast response.

I have split the changes into two commits and implemented the "only counter" logic.

@NoctivagusObitus
Copy link
Contributor Author

any chance on progressing on this?

@NoctivagusObitus
Copy link
Contributor Author

@1715173329 sorry for bothering you again. might there by any chance of progressing without waiting for @champtar to respond?

@1715173329
Copy link
Member

Please rebase this PR to resolve conflicts, otherwise LGTM.

@NoctivagusObitus
Copy link
Contributor Author

Thanks a lot. since there have been some changes in place I touched I would like to rebase and let it run on my devices for a bit to make sure I did not mess up anything. I will get back to you.

@NoctivagusObitus NoctivagusObitus force-pushed the feature_omit_zero_export branch from 9237ffb to 02ebc9d Compare December 7, 2025 15:39
@NoctivagusObitus
Copy link
Contributor Author

@1715173329 I have been running my fixed version now for a few weeks and it is looking good in my opinion.

for clarity. the CPU reduction is less significant these days since we are using buffered writes in lua by now. still it seams quite reasonable to avoid generating data which is not needed.

depending on the configuration there may be multiple
interfaces creating multiple time series always
reporting 0 value. omiting them from the export saves
resources. most notably cpu. this is limited to
counter types

Signed-off-by: Markus Hube <[email protected]>
@NoctivagusObitus NoctivagusObitus force-pushed the feature_omit_zero_export branch from 02ebc9d to 36dfbf2 Compare December 8, 2025 08:57
@1715173329 1715173329 merged commit 803a754 into openwrt:master Dec 9, 2025
1 check passed
@1715173329
Copy link
Member

Merged, thank you!

@champtar
Copy link
Member

champtar commented Dec 9, 2025

Sorry for never responding on this one, I was not super convinced as this is not something present in the go version, but it's disabled by default so that's fine
Thanks @NoctivagusObitus and @1715173329

@NoctivagusObitus
Copy link
Contributor Author

thank you @champtar for your acknowledgement, thank you @1715173329 for the merge. I am happy to have this feature opt in and happy to see it upstream :)

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

Successfully merging this pull request may close these issues.

4 participants