 exports.detachPci = detachPci
 #---------------------------------------------------------------------
 
+points = {}
 
 stats = $coroutine ({vm, granularity}) ->
   granularity = if granularity then granularity else 0
   # granularity: 0: every 5 sec along last 10 minutes, 1: every minute along last 2 hours, 2: every hour along past week, 3: everyday along past year
   # see http://xenserver.org/partners/developing-products-for-xenserver/18-sdk-development/96-xs-dev-rrds.html
+
+  if points[vm.id] and (Date.now() - points[vm.id].timestamp < 5000)
+    return points[vm.id]
+
   xapi = @getXAPI vm
 
   host = @getObject vm.$container

    cpus: cpus
    vifs: vifs
    xvds: xvds
  }

stats.params = {
  id: { type: 'string' }

      return
    return

  points[vm.id] = {
    memoryFree: memoryFree
    memoryUsed: memoryUsed
    memory: memory
