code: function record(name, num, statistics, aggregations, timestamp, callback) {
          timestamp = timestamp || Date.now();
          function recordStats(key) {
              statistics && statistics.forEach(function(stat) {
                      if(stat == 'sum') {
                          multi.hincrby(key, 'sum', num)
                      } else if(scripts[stat]){
                          evalScript(multi, stat, [key, num],[],function(err, result) {
                                  if(err) throw err;
                                  if(result && result.indexOf('ERR') == 0) {
                                      // console.log(scripts[stat]);
                                      throw new Error(result);
                                  }
                          })
                      }
              });
          }
          if(!statistics) statistics = ['sum'];
          if(num == undefined) num = 1;
  
          var multi = redis.multi();
  
          granularities.forEach(function(gran) {
                  var key = getGranKey(name, gran, timestamp);
                  recordStats(key);
                  var unitPeriod = gran[0];
                  multi.expire(key, points * unitPeriod / 1000);
          });
  
          if(aggregations) for(var i = 0; i < aggregations.length; i++) {
              var aggr = aggregations[i];
              var key = getAggrKey(name, aggr, timestamp);
              recordStats(key);
          }
  
          multi.exec(callback || log);
      }
docs: record behavior.
  @param statistics {Array} sum, max, min, count, avg
  @param aggregations {Array} dy (day in week each year), hm(hour of day each month).