Package com.opengamma.util.monitor

Examples of com.opengamma.util.monitor.OperationTimer.finished()


    if (_benchmarkCycles > 0) {
      final OperationTimer timer = new OperationTimer(_logger, "processing {} cycles fitting with {}", _benchmarkCycles, name);
      for (int i = 0; i < _benchmarkCycles; i++) {
        fitter.getFitResult(OPTIONS, DATA, ERRORS, start, fixed);
      }
      timer.finished();
    }
  }

  @Test
  public void testNoisyFitNLSS() {
View Full Code Here


    if (benchmarkCycles > 0) {
      final OperationTimer timer = new OperationTimer(logger, "processing {} cycles on testBlackScholesEquation2", benchmarkCycles);
      for (int i = 0; i < benchmarkCycles; i++) {
        TESTER.testBlackScholesEquationUniformGrid(SOLVER, timeSteps, priceSteps, lowerMoneyness, upperMoneyness, volTol, priceTol, deltaTol, gammaTol, print);
      }
      timer.finished();
    }
  }

  @Test
  public void testBlackScholesEquationNonuniformGrid() {
View Full Code Here

      LocalDate seriesDate = simulationSeriesDate.minusDays(random.nextInt(numDaysHistory));
      UniqueId id = generateId(random.nextInt(1260));
      simulationSource.setCurrentSimulationExecutionDate(seriesDate);
      simulationSource.getHistoricalTimeSeries(id, null, false, null, false);
    }
    System.out.println("Loading 1000 TS took " + timer.finished());
  }

  private void writeOneSimulationSeriesDate(RedisSimulationSeriesSource simulationSource, LocalDate simulationSeriesDate, int nSeries) {
    OperationTimer timer = new OperationTimer(s_logger, "Storing many time series");
   
View Full Code Here

    // 20 points, 10 curves
    for (int i = 0; i < nSeries; i++) {
      performanceWriteOneSeries(simulationSource, generateId(i), simulationSeriesDate);
    }
   
    System.out.println("Writing " + nSeries + " series took " + timer.finished());
  }
 
  private static void performanceWriteOneSeries(RedisSimulationSeriesSource source, UniqueId id, LocalDate simulationSeriesDate) {
    LocalDate valueDate = LocalDate.now();
    LocalDateDoubleTimeSeriesBuilder seriesBuilder = ImmutableLocalDateDoubleTimeSeries.builder();
View Full Code Here

    if (benchmarkCycles > 0) {
      final OperationTimer timer = new OperationTimer(logger, "processing {} cycles on timeTest", benchmarkCycles);
      for (int i = 0; i < benchmarkCycles; i++) {
        mc.solve(grid, 0.5);
      }
      timer.finished();
    }

  }

  @Test(enabled = false)
View Full Code Here

            }
          } // end loopstr
        } // end loopmat
      } // end loopexpiry
    } // end loopins
    timer.finished();
  }

  private double[][][] bump(final int exp, final int mat, final int str, final double bump) {
    final double[][][] vol = new double[NB_EXPIRY][NB_MATURITY][NB_STRIKE];
    for (int loopexpiry = 0; loopexpiry < NB_EXPIRY; loopexpiry++) {
View Full Code Here

    s_logger.debug("Reading Redis LKV values for normalizationRuleSetId:{} globalPrefix:{} dataFieldBlackList:{} schemeBlackList:{}",
        new Object[] {getNormalizationRuleSetId(), getGlobalPrefix(), _dataFieldBlackList.keySet(), _schemeBlackList.keySet()});
    List<ExternalId> allSecurities = getAllSecurities();
    OperationTimer timer = new OperationTimer(s_logger, "Reading LKV for {} securities", allSecurities.size());
    Map<ExternalId, Map<String, String>> result = getLastKnownValues(allSecurities);
    timer.finished();
    return result;
  }
 
  @SuppressWarnings("unchecked")
  public Map<ExternalId, Map<String, String>> getLastKnownValues(final List<ExternalId> securities) {
View Full Code Here

        _completionService.take();
      } catch (Exception ex) {
        throw new OpenGammaRuntimeException("Error writing TS to remote master", ex);
      }
    }
    timer.finished();
  }

  protected void loadSnapshot(final MarketDataSnapshotMaster marketDataSnapshotMaster) {
    s_logger.info("loading market data snapshots");
    AbstractTool<ToolContext> remoteServerTool = new AbstractTool<ToolContext>() {
View Full Code Here

        ticks.put(securityId, secTicks);
      }
    } finally {
      IOUtils.closeQuietly(fis);
    }
    timer.finished();
    return ticks;
  }
 
}
View Full Code Here

    } catch (FileNotFoundException ex) {
      throw new OpenGammaRuntimeException("Could not open RedisLKVSnaphot file '" + outputFile.getAbsolutePath() + "'", ex);
    } finally {
      IOUtils.closeQuietly(fos);
    }
    timer.finished();
  }

  private void ensureParentDirectory(final File outputFile) {
    try {
      s_logger.debug("creating directory {}", outputFile.getParent());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.