Examples of ProfileHandler


Examples of mondrian.spi.ProfileHandler

        if (RolapUtil.PROFILE_LOGGER.isDebugEnabled()
            && statement.getProfileHandler() == null)
        {
            statement.enableProfiling(
                new ProfileHandler() {
                    public void explain(String plan, QueryTiming timing) {
                        if (timing != null) {
                            plan += "\n" + timing;
                        }
                        RolapUtil.PROFILE_LOGGER.debug(plan);
View Full Code Here

Examples of mondrian.spi.ProfileHandler

                validator,
                resultStyleList);

        final int expDeps =
            MondrianProperties.instance().TestExpDependencies.get();
        final ProfileHandler profileHandler = statement.getProfileHandler();
        if (profileHandler != null) {
            // Cannot test dependencies and profile at the same time. Profiling
            // trumps.
            compiler = RolapUtil.createProfilingCompiler(compiler);
        } else if (expDeps > 0) {
View Full Code Here

Examples of mondrian.spi.ProfileHandler

    public void setStatementProfiling(
        OlapStatement statement,
        final PrintWriter pw)
    {
        ((MondrianOlap4jStatement) statement).enableProfiling(
            new ProfileHandler() {
                public void explain(String plan, QueryTiming timing) {
                    pw.println(plan);
                    if (timing != null) {
                        pw.println(timing);
                    }
View Full Code Here

Examples of mondrian.spi.ProfileHandler

    public void close() {
        if (closed) {
            return;
        }
        this.closed = true;
        final ProfileHandler profileHandler =
            olap4jStatement.getProfileHandler();
        if (profileHandler != null) {
            final StringWriter stringWriter = new StringWriter();
            final PrintWriter printWriter = new PrintWriter(stringWriter);
            olap4jStatement.getQuery().explain(printWriter);
            printWriter.close();
            profileHandler.explain(stringWriter.toString(), getQueryTiming());
        }
        if (this.result != null) {
            this.result.close();
        }
        olap4jStatement.onResultSetClose(this);
View Full Code Here

Examples of org.apache.oodt.profile.handlers.ProfileHandler

   * @return
   */
  public List<Profile> makeProfiles(final File configFile) throws Exception {

    // parse THREDDS catalogs, create OODT profiles
    ProfileHandler profileHandler = new OpendapProfileHandler();
    XMLQuery xmlQuery = Profiler.buildXMLQuery(configFile);
    @SuppressWarnings(value = "unchecked")
    final List<Profile> profiles = profileHandler.findProfiles(xmlQuery);
   
    // check profiles
    for (final Profile profile : profiles) {
      final StringBuilder sb = new StringBuilder();
      boolean ok = ProfileChecker.check(profile, sb);
View Full Code Here

Examples of org.apache.oodt.profile.handlers.ProfileHandler

    Transformer transformer = null;                 // Start out w/no transformer and no doc
    Document doc = null;                   // Don't make 'em if we don't need 'em
    boolean sentAtLeastOne = false;                 // Track if we send any profiles at all
    Exception exception = null;                 // And save any exception
    for (Iterator i = handlers.iterator(); i.hasNext();) try {         // To iterate over each handler
      ProfileHandler handler = (ProfileHandler) i.next();            // Get the handler
      String id = handler.getID();                                   // Get the ID, and if targeting to IDs
      if (!ids.isEmpty() && !ids.contains(id)) continue;             // ... and it's not one we want, skip it.
      List results = handler.findProfiles(query);                    // Have it find profiles
      if (results == null) results = Collections.EMPTY_LIST;         // Assume nothing
      for (Iterator j = results.iterator(); j.hasNext();) {          // For each matching profile
        Profile profile = (Profile) j.next();                 // Get the profile
        if (transformer == null) {                   // No transformer/doc yet?
          transformer = createTransformer();             // Then make the transformer
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.