PCA (Prometheus Certified Associate) sample exam question with answer 360

Question:
What is the difference between the rate and deriv query functions?

  1. deriv operates on gauge metrics while rate operates on counter metrics
  2. deriv calculates the average rate of change whereas rate calculates the derivative (instantaneous rate of change)
  3. rate operates on gauge metrics while deriv operates on counter metrics
  4. rate calculates the average rate of change of a counter metric whereas deriv calculates the derivative (instantaneous rate of change) of a counter metric
Answer:
A - is the correct answer: rate and deriv
B - is incorrect as rate calculates the average rate of change of a counter metric while irate calculates the "instantaneous" rate of change of a counter metric. The deriv function calculates the per-second derivative of a gauge metric
C - is incorrect as rate actually operates on counter metrics while deriv actually operates on gauge metrics
D - is incorrect as the deriv function should only be used with gauges, not counters