Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Rate calculation for non-SNMP protocol best practices

Solved2.36K views15th October 2020best practices bit rate class library protocol
6
Thomas Cauwelier [SLC] [DevOps Advocate]1.50K 12th October 2020 0 Comments

I want to display a rate using the Lost Packages counter that my device provides.
(e.g. Lost Packages/s)
I was planning to use the Class Library RateCalculator class from the common namespace.
The CalculateRate method requires a delta and minDelta argument to be provided.
What would be the best way to get a delta and what would be a good value for minDelta?
Note: the protocol uses HTTP sessions to communicate with the device, so I can’t use the GetSnmpGroupExecutionDelta method.

Additionally, do I need to make my polling timer fixed?

Edit: Please look at the answers from David, Simon and Miguel!
They all contain valid things to look out for during development.

Thomas Cauwelier [SLC] [DevOps Advocate] Changed status to publish 15th October 2020

3 Answers

  • Active
  • Voted
  • Newest
  • Oldest
1
David Pernes [SLC]90 Posted 12th October 2020 0 Comments

Best way to get a delta is to create a new column defining a TimeStamp. This time stamp would initially be 0 and all rates and counters should be 0’ed as well. delta = (Current_Sample_TimeStamp – Previous_Sample_TimeStamp) The timestamp, ideally should come from the product http reply, if not try the using the group timestamps (not sure if retrievable) or if all else fails use the actual DateTime.Now (with the risk of some level imprecision). Regarding minDelta, which is a value that defines whether or not calculations should be executed by comparing it to delta, best practice should be the frequency on which the row is updated. Anything under that value should be disregarded as it should be considered that the sample was collected too fast. A big minDelta prevents calculations from happening over and over while increasing the imprecision of the rate/s. A small minDelta allows many calculations to happen improving the precision of the rate/s at the cost of performance by actually doing the calculations over and over. In an implementation I’ve done, I set it to 1ms since the protocol was already using polling based on timer, so it is safe to assume that the protocol flow would never try calculating rates more times than it should.

Thomas Cauwelier [SLC] [DevOps Advocate] Selected answer as best 13th October 2020
3
Simon Vandamme [SLC] [DevOps Advocate]952 Posted 13th October 2020 0 Comments

Answer provided by David regarding delta calculation is correct but let me add my 2 cents regarding making the polling timer fixed:
You have 2 options there, the easy one is indeed to make that timer fixed.
The other option is to leave it configurable but in that case, you’ll need to retrieve the value of the [Timer base] DataMiner Internal parameter of your element (parameter id=”65017″) and take it into account in order to define your minDelta.

Note that another (even better) approach is to let the end user define the minDelta as this might depend from one device to another. It might even depend from one interface to another on the same device.
In that case, you can buffer the delta and counter values and calculate the rate by using the current value against the ‘latest value older than (currentTime – minDelta)’.
This is a better approach as if we poll counter values and calculate rates faster than the device itself updates its counters, it might lead to misleading results.
Note that a task has been made to update the Class Library and protocol SDF according to this last approach.

Simon Vandamme [SLC] [DevOps Advocate] Edited answer 13th October 2020
1
Miguel Obregon [SLC] [DevOps Catalyst]19.12K Posted 13th October 2020 0 Comments

Hi Thomas,

I believe a good starting point is to have the following details from the device:

  • Counter size: Are we referring to a 32 or 64 bit counter? The RateCalculator library uses different approach when dealing with 32 or 64 bit counter
  • How often the device update the counters? This will define the polling frequency of the counters and set a proper minDelta value

For the delta calculation, you could use one of the alternatives already described by David. However, if the device provides you a timestamp when the counters are updated, it will be better to use this timestamp for your delta calculation.

The main challenge when calculating rates is to be sure that the driver polls the device when the counters are updated.

Miguel Obregon [SLC] [DevOps Catalyst] Answered question 13th October 2020
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs