(requestContext, seriesList)
return results
This is the opposite of the integral function.  This is useful for taking a
  running total metric and calculating the delta between subsequent data points.

  This function does not normalize for periods of time, as a true derivative would.
  Instead see the perSecond() function to calculate a rate of change over time.

  Example:

  .. code-block:: none

    &target=derivative(company.server.application01.ifconfig.TXPackets)

  Each time you run ifconfig, the RX and TXPackets are higher (assuming there
  is network traffic.) By applying the derivative function, you can get an
  idea of the packets per minute sent or received, even though you're only
  recording the total.
This is the opposite of the integral function.  This is useful for taking a
  running total metric and calculating the delta between subsequent data points.
This is the opposite of the integral function . This is useful for taking a running total metric and calculating the delta between subsequent data points .
def derivative(requestContext, seriesList):
  """
  This is the opposite of the integral function.  This is useful for taking a
  running total metric and calculating the delta between subsequent data points.

  This function does not normalize for periods of time, as a true derivative would.
  Instead see the perSecond() function to calculate a rate of change over time.

  Example:

  .. code-block:: none

    &target=derivative(company.server.application01.ifconfig.TXPackets)

  Each time you run ifconfig, the RX and TXPackets are higher (assuming there
  is network traffic.) By applying the derivative function, you can get an
  idea of the packets per minute sent or received, even though you're only
  recording the total.
  """
  results = []
  for series in seriesList:
    if settings.AUTOCOMPRESS_GAPS_IN_DERIVATIVE_FUNCTIONS:
      series = _compressPeriodicGaps(series)
    newValues = []
    prev = None
    for val in series:
      if None in (prev,val):
        newValues.append(None)
        prev = val
        continue
      newValues.append(val - prev)
      prev = val
    series.tags['derivative'] = 1
    newName = "derivative(%s)" % series.name
    newSeries = series.copy(name=newName, values=newValues)
    results.append(newSeries)
  return results
def derivative ( requestContext , seriesList ) : results = [ ] for series in seriesList : if settings . AUTOCOMPRESS_GAPS_IN_DERIVATIVE_FUNCTIONS : series = _compressPeriodicGaps ( series ) newValues = [ ] prev = None for val in series : if None in ( prev , val ) : newValues . append ( None ) prev = val continue newValues . append ( val - prev ) prev = val series . tags [ 'derivative' ] = 1 newName = "derivative(%s)" % series . name newSeries = series . copy ( name = newName , values = newValues ) results . append ( newSeries ) return results