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

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

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

Statistics.getStartTime介绍

[英]The milliseconds (JVM standard System#currentTimeMillis()) since the initial creation of this Statistics instance or the last time #clear() was called.
[中]自初始创建此统计实例或上次调用#clear()以来的毫秒数(JVM标准系统#currentTimeMillis()。

代码示例

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

json.put("CollectionRemoveCount", statistics.getCollectionRemoveCount());
json.put("CollectionRecreateCount", statistics.getCollectionRecreateCount());
json.put("StartTime", statistics.getStartTime());
json.put("SecondLevelCacheRegionNames", statistics.getSecondLevelCacheRegionNames());
json.put("SuccessfulTransactionCount", statistics.getSuccessfulTransactionCount());

代码示例来源:origin: net.sf.ehcache/ehcache

/**
 * {@inheritDoc}
 * 
 * @see net.sf.ehcache.hibernate.management.api.HibernateStats#getQueryExecutionRate()
 */
public double getQueryExecutionRate() {
  long startTime = getStatistics().getStartTime();
  long now = System.currentTimeMillis();
  double deltaSecs = (now - startTime) / MILLIS_PER_SECOND;
  return getQueryExecutionCount() / deltaSecs;
}

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

/**
 * @see StatisticsServiceMBean#getStartTime()
 */
public long getStartTime() {
  return stats.getStartTime();
}

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

/**
 * @see StatisticsServiceMBean#getStartTime()
 */
public long getStartTime() {
  return stats.getStartTime();
}

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

/**
 * @see StatisticsServiceMBean#getStartTime()
 */
public long getStartTime() {
  return stats.getStartTime();
}

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

/**
 * @see StatisticsServiceMBean#getStartTime()
 */
public long getStartTime() {
  return stats.getStartTime();
}

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

public double getCachePutRate() {
 long startTime = statistics.getStartTime();
 long now = System.currentTimeMillis();
 double deltaSecs = (now - startTime) / 1000d;
 return getCachePutCount() / deltaSecs;
}

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

public double getCacheMissRate() {
 long startTime = statistics.getStartTime();
 long now = System.currentTimeMillis();
 double deltaSecs = (now - startTime) / 1000d;
 return getCacheMissCount() / deltaSecs;
}

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

public double getQueryExecutionRate() {
 long startTime = statistics.getStartTime();
 long now = System.currentTimeMillis();
 double deltaSecs = (now - startTime) / 1000d;
 return getQueryExecutionCount() / deltaSecs;
}

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

public double getCacheHitRate() {
 long startTime = statistics.getStartTime();
 long now = System.currentTimeMillis();
 double deltaSecs = (now - startTime) / 1000d;
 return getCacheHitCount() / deltaSecs;
}

代码示例来源:origin: net.sf.ehcache.internal/ehcache-core

/**
 * {@inheritDoc}
 * 
 * @see net.sf.ehcache.hibernate.management.api.HibernateStats#getQueryExecutionRate()
 */
public double getQueryExecutionRate() {
  long startTime = getStatistics().getStartTime();
  long now = System.currentTimeMillis();
  double deltaSecs = (now - startTime) / MILLIS_PER_SECOND;
  return getQueryExecutionCount() / deltaSecs;
}

代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache

/**
 * {@inheritDoc}
 * 
 * @see net.sf.ehcache.hibernate.management.api.HibernateStats#getQueryExecutionRate()
 */
public double getQueryExecutionRate() {
  long startTime = getStatistics().getStartTime();
  long now = System.currentTimeMillis();
  double deltaSecs = (now - startTime) / MILLIS_PER_SECOND;
  return getQueryExecutionCount() / deltaSecs;
}

代码示例来源:origin: org.hibernate/hibernate-tools

if(value instanceof Statistics) {
  Statistics stats = (Statistics) value;
  text = "Statistics " + formatter.format( new Date(stats.getStartTime()) );
  tooltip = stats.toString();

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache

/**
 * {@inheritDoc}
 * 
 * @see net.sf.ehcache.hibernate.management.api.HibernateStats#getQueryExecutionRate()
 */
public double getQueryExecutionRate() {
  long startTime = getStatistics().getStartTime();
  long now = System.currentTimeMillis();
  double deltaSecs = (now - startTime) / MILLIS_PER_SECOND;
  return getQueryExecutionCount() / deltaSecs;
}

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

if(value instanceof Statistics) {
  Statistics stats = (Statistics) value;
  text = "Statistics " + formatter.format( new Date(stats.getStartTime()) );
  tooltip = stats.toString();

代码示例来源: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.getStartTime();

相关文章

Statistics类方法