Package com.opengamma.util.monitor

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


          for (int i = 0; i < 100; i++) {
            final double x = -0. + i * 1000. / 100.0;
            res += function.evaluate(x);
          }
        }
        timer.finished();
      }
      res *= 3;
    }
  }
}
View Full Code Here


      } else {
        System.out.printf("Loading %d ts:  dataField: %s dataProvider: %s startDate: %s endDate: %s\n", identifiersSize, dataField, dataProvider, startDate, endDate);
      }
      OperationTimer timer = new OperationTimer(s_logger, " loading " + identifiersSize + " timeseries from Bloomberg");
      Map<ExternalIdBundle, LocalDateDoubleTimeSeries> tsMap = provideTimeSeries(bundle2WithDates.keySet(), dataField, dataProvider, startDate, endDate);
      timer.finished();
     
      timer = new OperationTimer(s_logger, " storing " + identifiersSize + " timeseries from Bloomberg");
      storeTimeSeries(tsMap, dataField, dataProvider, withDates2ExternalId, bundle2WithDates, result);
      timer.finished();
    }
View Full Code Here

      Map<ExternalIdBundle, LocalDateDoubleTimeSeries> tsMap = provideTimeSeries(bundle2WithDates.keySet(), dataField, dataProvider, startDate, endDate);
      timer.finished();
     
      timer = new OperationTimer(s_logger, " storing " + identifiersSize + " timeseries from Bloomberg");
      storeTimeSeries(tsMap, dataField, dataProvider, withDates2ExternalId, bundle2WithDates, result);
      timer.finished();
    }
  }

  /**
   * Loads time-series from the underlying source.
View Full Code Here

  public WebViewGrid setIncludeDepGraph(WebGridCell cell, boolean includeDepGraph) {
    if (includeDepGraph) {
      String gridName = getName() + ".depgraph-" + cell.getRowId() + "-" + cell.getColumnId();
      OperationTimer timer = new OperationTimer(s_logger, "depgraph");
      Pair<String, ValueSpecification> columnMappingPair = getGridStructure().findCellSpecification(cell, getViewClient().getLatestCompiledViewDefinition());
      s_logger.debug("includeDepGraph took {}", timer.finished());
      WebViewDepGraphGrid grid = new WebViewDepGraphGrid(gridName, getViewClient(), getConverterCache(),
          getLocalSession(), getRemoteSession(), cell, columnMappingPair.getFirst(), columnMappingPair.getSecond(), getComputationTargetResolver());
      _depGraphGrids.putIfAbsent(cell, grid);
      return grid;
    } else {
View Full Code Here

    if (BENCHMARK_CYCLES > 0) {
      final OperationTimer timer = new OperationTimer(s_logger, "processing {} cycles on " + name, BENCHMARK_CYCLES);
      for (int i = 0; i < BENCHMARK_CYCLES; i++) {
        doTest(minimizer, function, grad, startPosition);
      }
      timer.finished();
    }
  }

  private void doTest(final Minimizer<Function1D<DoubleMatrix1D, Double>, DoubleMatrix1D> minimizer, final Function1D<DoubleMatrix1D, Double> function,
      final Function1D<DoubleMatrix1D, DoubleMatrix1D> grad, final DoubleMatrix1D startPosition) {
View Full Code Here

    if (BENCHMARK_CYCLES > 0) {
      final OperationTimer timer = new OperationTimer(s_logger, "processing {} cycles on Levenberg-Marquardt", BENCHMARK_CYCLES);
      for (int i = 0; i < BENCHMARK_CYCLES; i++) {
        solveExactWithoutGradientTest();
      }
      timer.finished();
    }
  }

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

    if (BENCHMARK_CYCLES > 0) {
      final OperationTimer timer = new OperationTimer(s_logger, "processing {} cycles on Conjugate gradient", BENCHMARK_CYCLES);
      for (int i = 0; i < BENCHMARK_CYCLES; i++) {
        solveExactFromChiSqTest();
      }
      timer.finished();
    }
  }

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

      for (int count = 0; count < benchmarkCycles; count++) {
        for (int i = 0; i < nStrikes; i++) {
          final double[] prices = multiPricers[i].price(VOL);
        }
      }
      timer.finished();
    }

    for (int count = 0; count < warmup; count++) {
      for (int i = 0; i < nStrikes; i++) {
        final int n = pricers[i].length;
View Full Code Here

          for (int j = 0; j < n; j++) {
            final double p = pricers[i][j].price(VOL);
          }
        }
      }
      timer2.finished();
    }
  }

  // since finding implied vol is expensive compared to finding a price (10-20 times more), there is little (relative) difference here. This is why it is
  // quicker to to caplet stripping based on price (weighted by vega) rather than implied vol.
View Full Code Here

      for (int count = 0; count < benchmarkCycles; count++) {
        for (int i = 0; i < nStrikes; i++) {
          final double[] vols = multiPricers[i].impliedVols(VOL);
        }
      }
      timer.finished();
    }

    for (int count = 0; count < warmup; count++) {
      for (int i = 0; i < nStrikes; i++) {
        final int n = pricers[i].length;
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.