private void flush(Tuple tickTuple){
  LOG.info(String.format("Flushing profile: profile=%s, entity=%s",measurement.getProfileName(),measurement.getEntity()));
  Object result;
  try {
    String resultExpr=profileConfig.getResult();
    result=executor.execute(resultExpr,new JSONObject(),Object.class);
  }
 catch (  ParseException e) {
    throw new ParseException("Bad 'result' expression",e);
  }
  measurement.setValue(result);
  emit(measurement,tickTuple);
  executor.clearState();
  measurement=null;
}

private void flush ( Tuple tickTuple ) { LOG . info ( String . format ( "Flushing profile: profile=%s, entity=%s" , measurement . getProfileName ( ) , measurement . getEntity ( ) ) ) ; Object result ; try { String resultExpr = profileConfig . getResult ( ) ; result = executor . execute ( resultExpr , new JSONObject ( ) , Object . class ) ; } catch ( ParseException e ) { throw new ParseException ( "Bad 'result' expression" , e ) ; } measurement . setValue ( result ) ; emit ( measurement , tickTuple ) ; executor . clearState ( ) ; measurement = null ; }
flush the profile . executed on a fixed time period when a tick tuple is received . completes and emits the profilemeasurement . clears all state in preparation for the next window period .
