Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • U ucollect
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Turris
  • ucollect
  • Merge requests
  • !38

fixes #36: bandwidth: wrong initialization of buckets

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Martin Petráček requested to merge bandwidth-bucket-init-fix into master Feb 20, 2017
  • Overview 3
  • Commits 1
  • Changes 1

This merge request (hopefully) fixes #36 (closed), sending of 0-speed bucket by bandwidth plugin.

There was a problem with initialization of buckets (which also corrupted other data). The reason was that index counter was not reset after setting of windows, so first 5 buckets were not initialized at all (and the rest of them was shifted).

This is also the reason why timestamp in the data shown in the issue #36 (closed) is (nonsensically) 75000000. Because the 600000kbps (=75000000B/s) is wrongly written into timestamp instead of bucket key.


This actually could cause repeatedly wrong data even after the counters were reset (in communicate). Bucket 5 was initialized to key 0, so the intentional skipping of bucket idx 0 (for (i=1;...)) in update_buckets was not helping here.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: bandwidth-bucket-init-fix