All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.java.truevfs.ext.insight.stats.FsStatisticsView.scala Maven / Gradle / Ivy

Go to download

Instruments the TrueVFS Kernel for statistics monitoring via JMX. Add the JAR artifact of this module to the run time class path to make its services available for service location in the client API modules.

There is a newer version: 0.14.0
Show newest version
/*
 * Copyright (C) 2005-2013 Schlichtherle IT Services.
 * All rights reserved. Use is subject to license terms.
 */
package net.java.truevfs.ext.insight.stats

import java.util._
import scala.math._

/**
 * @author Christian Schlichtherle
 */
trait FsStatisticsView {

  def stats: FsStatistics

  final def readStats = stats.readStats
  final def writeStats = stats.writeStats
  final def syncStats = stats.syncStats
  final def timeMillis = stats.timeMillis

  final def getReadBytesPerOperation = readStats.bytesPerOperation
  final def getReadBytesTotal = readStats.bytesTotal
  final def getReadKilobytesPerSecond = readStats.kilobytesPerSecond
  final def getReadNanosecondsPerOperation = readStats.nanosecondsPerOperation
  final def getReadNanosecondsTotal = readStats.nanosecondsTotal
  final def getReadOperations = readStats.sequenceNumber
  final def getReadThreadsTotal = readStats.threadsTotal

  final def getWriteBytesPerOperation = writeStats.bytesPerOperation
  final def getWriteBytesTotal = writeStats.bytesTotal
  final def getWriteKilobytesPerSecond = writeStats.kilobytesPerSecond
  final def getWriteNanosecondsPerOperation = writeStats.nanosecondsPerOperation
  final def getWriteNanosecondsTotal = writeStats.nanosecondsTotal
  final def getWriteOperations = writeStats.sequenceNumber
  final def getWriteThreadsTotal = writeStats.threadsTotal

  final def getSyncNanosecondsPerOperation = syncStats.nanosecondsPerOperation
  final def getSyncNanosecondsTotal = syncStats.nanosecondsTotal
  final def getSyncOperations = syncStats.sequenceNumber
  final def getSyncThreadsTotal = syncStats.threadsTotal

  final def getTimeCreatedDate = new Date(getTimeCreatedMillis).toString
  final def getTimeCreatedMillis = timeMillis
  final def getTimeUpdatedDate = new Date(getTimeUpdatedMillis).toString
  final def getTimeUpdatedMillis =
    max(max(readStats.timeMillis, writeStats.timeMillis), syncStats.timeMillis)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy