Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discovering units of metadata reported by INT switches #15

Open
mhira1 opened this issue Feb 2, 2018 · 1 comment
Open

Discovering units of metadata reported by INT switches #15

mhira1 opened this issue Feb 2, 2018 · 1 comment

Comments

@mhira1
Copy link
Contributor

mhira1 commented Feb 2, 2018

Certain metadata reported by INT switches, such as Timestamp and Queue occupancy may have different units at different hops. For example, some switches may report timestamp in nanoseconds, while others report in microseconds. Some switches may report queue occupancy in bytes while others may report in number of cells. Cell size in bytes may also vary from one switch to another.

The monitoring system needs to identify units reported by each switch.

@jafingerhut
Copy link

And some timestamps may be in neither of those units, at least as currently allowed in the latest draft PSA specification.

e.g. a device with a clock rate of 1.25 GHz might report timestamps in units of clock cycles that increment 1.25 billion times per second.

One way to specify the rate of timestamp advance in a very precise way, without resorting to floating point numbers, is to use integer ratios, e.g. something like this:

  // The timestamp value of this device increments
  // `increments_per_period` times every `period_in_seconds` seconds.
  uint64 increments_per_period = 2;
  uint64 period_in_seconds = 3;

That allows clock speeds like 1.333... GHz to be specified as increments_per_period = 4,000,000,000 and period_in_seconds = 3.

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

No branches or pull requests

2 participants