org.hibernate.stat.Statistics.getQueryExecutionMaxTimeQueryString()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.8k)|赞(0)|评价(0)|浏览(86)

本文整理了Java中org.hibernate.stat.Statistics.getQueryExecutionMaxTimeQueryString()方法的一些代码示例,展示了Statistics.getQueryExecutionMaxTimeQueryString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Statistics.getQueryExecutionMaxTimeQueryString()方法的具体详情如下:
包路径:org.hibernate.stat.Statistics
类名称:Statistics
方法名:getQueryExecutionMaxTimeQueryString

Statistics.getQueryExecutionMaxTimeQueryString介绍

[英]Get the query string for the slowest query.
[中]获取最慢查询的查询字符串。

代码示例

代码示例来源:origin: hibernate/hibernate-orm

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics( getEntityManagerFactory( args ) );
    return String.valueOf( statistics != null ? statistics.getQueryExecutionMaxTimeQueryString() : 0 );
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return String.valueOf(statistics != null ? statistics.getQueryExecutionMaxTimeQueryString() : 0);
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return String.valueOf(statistics != null ? statistics.getQueryExecutionMaxTimeQueryString() : 0);
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return String.valueOf(statistics != null ? statistics.getQueryExecutionMaxTimeQueryString() : 0);
  }
};

代码示例来源:origin: wildfly/wildfly

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return String.valueOf(statistics != null ? statistics.getQueryExecutionMaxTimeQueryString() : 0);
  }
};

代码示例来源:origin: gocd/gocd

json.put("QueryExecutionCount", statistics.getQueryExecutionCount());
json.put("QueryExecutionMaxTime", statistics.getQueryExecutionMaxTime());
json.put("QueryExecutionMaxTimeQueryString", statistics.getQueryExecutionMaxTimeQueryString());
json.put("QueryCacheHitCount", statistics.getQueryCacheHitCount());
json.put("QueryCacheMissCount", statistics.getQueryCacheMissCount());

代码示例来源:origin: jboss.jboss-embeddable-ejb3/hibernate-all

public String getQueryExecutionMaxTimeQueryString() {
    return stats.getQueryExecutionMaxTimeQueryString();
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate

public String getQueryExecutionMaxTimeQueryString() {
    return stats.getQueryExecutionMaxTimeQueryString();
  }
}

代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core

public String getQueryExecutionMaxTimeQueryString() {
    return stats.getQueryExecutionMaxTimeQueryString();
  }
}

代码示例来源:origin: org.jipijapa/jipijapa-hibernate4-3

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return String.valueOf(statistics != null ? statistics.getQueryExecutionMaxTimeQueryString() : 0);
  }
};

代码示例来源:origin: org.jboss.as/jboss-as-jpa-hibernate4

@Override
  void handle(final ModelNode response, final String name, ManagementLookup stats, OperationContext context) {
    String sql = stats.getStatistics().getQueryExecutionMaxTimeQueryString();
    if (sql != null) {
      response.set(sql);
    } else {
      context.getResult();        // result will be undefined
    }
  }
});

代码示例来源:origin: org.jboss.eap/jipijapa-hibernate5-3

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return String.valueOf(statistics != null ? statistics.getQueryExecutionMaxTimeQueryString() : 0);
  }
};

代码示例来源:origin: org.jipijapa/jipijapa-hibernate4-1

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return String.valueOf(statistics != null ? statistics.getQueryExecutionMaxTimeQueryString() : 0);
  }
};

代码示例来源:origin: org.jboss.eap/jipijapa-hibernate4-3

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return String.valueOf(statistics != null ? statistics.getQueryExecutionMaxTimeQueryString() : 0);
  }
};

代码示例来源:origin: org.jboss.eap/jipijapa-hibernate5

@Override
  public Object invoke(Object... args) {
    org.hibernate.stat.Statistics statistics = getStatistics(getEntityManagerFactory(args));
    return String.valueOf(statistics != null ? statistics.getQueryExecutionMaxTimeQueryString() : 0);
  }
};

代码示例来源:origin: org.terracotta.modules/tim-hibernate-cache-provider-3.2

public StatisticData[] retrieveStatisticData() {
  final List<StatisticData> resultList = new ArrayList<StatisticData>();
  for (Map.Entry<String, Statistics> entry : statistics.entrySet()) {
   final String element = entry.getKey();
   final Statistics stats = entry.getValue();

   resultList.add(new StatisticData(NAME_CACHE_HIT, element, stats.getQueryCacheHitCount()));
   resultList.add(new StatisticData(NAME_CACHE_MISS, element, stats.getQueryCacheMissCount()));
   resultList.add(new StatisticData(NAME_CACHE_PUT, element, stats.getQueryCachePutCount()));
   resultList.add(new StatisticData(NAME_EXECUTION_COUNT, element, stats.getQueryExecutionCount()));
   resultList.add(new StatisticData(NAME_EXECUTION_MAX_TIME, element, stats.getQueryExecutionMaxTime()));
   resultList.add(new StatisticData(NAME_EXECUTION_MAX_TIME_QUERY, element, stats.getQueryExecutionMaxTimeQueryString()));
  }

  if (0 == resultList.size()) { return StatisticData.EMPTY_ARRAY; }

  final StatisticData[] result = new StatisticData[resultList.size()];
  resultList.toArray(result);
  return result;
 }
}

代码示例来源:origin: OpenClinica/OpenClinica

logger.info(stats.getQueryExecutionMaxTimeQueryString());
logger.info("hit count"+stats.getSecondLevelCacheHitCount());
stats.logSummary();

代码示例来源:origin: riotfamily/riot

@Override
protected void populateStats(Statistics stats) throws Exception {
  org.hibernate.stat.Statistics hs = sessionFactory.getStatistics();
  stats.add("Start time", new Date(hs.getStartTime()));
  stats.add("Flush count", hs.getFlushCount());
  stats.add("Session open count", hs.getSessionOpenCount());
  stats.add("Session close count", hs.getSessionCloseCount(), 
        hs.getSessionCloseCount() < hs.getSessionOpenCount());
  
  stats.add("Transaction count", hs.getTransactionCount());
  stats.add("Successful transaction count", hs.getSuccessfulTransactionCount());
  stats.add("Optimistic failure count", hs.getOptimisticFailureCount());
  stats.add("Connect count", hs.getConnectCount());
  stats.add("Prepare statement count", hs.getPrepareStatementCount());
  stats.add("Close statement count", hs.getCloseStatementCount());
  
  stats.add("Query execution count", hs.getQueryExecutionCount());
  stats.addOkBelow("Query execution max time", hs.getQueryExecutionMaxTime(), 1000);
  stats.add("Slowest statement", hs.getQueryExecutionMaxTimeQueryString());
}

代码示例来源:origin: stackoverflow.com

return stats.getQueryExecutionMaxTimeQueryString();

相关文章

Statistics类方法