com.bigdata.journal
Class DiskOnlyStrategy.StoreCounters

java.lang.Object
  extended by com.bigdata.journal.DiskOnlyStrategy.StoreCounters
Enclosing class:
DiskOnlyStrategy

public static class DiskOnlyStrategy.StoreCounters
extends Object

Counters for IRawStore access, including operations that read or write through to the underlying media.

Version:
$Id: DiskOnlyStrategy.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
TODO:
report elapsed time and average latency for force, reopen, and writeRootBlock., counters need to be atomic if we want to avoid the possibility of concurrent x++ operations failing to correctly increment x for each request.

Field Summary
 long bytesRead
          #of bytes read.
 long bytesReadFromDisk
          #of bytes that have been read from the disk.
 long bytesWritten
          #of bytes written.
 long bytesWrittenOnDisk
          #of bytes that have been written on the disk.
 long elapsedCacheReadNanos
          Total elapsed time checking the disk write cache for records to be read.
 long elapsedCacheWriteNanos
          Total elapsed time writing records into the cache (does not count time to flush the cache when it is full or to write records that do not fit in the cache directly to the disk).
 long elapsedDiskReadNanos
          Total elapsed time for reading on the disk.
 long elapsedDiskWriteNanos
          Total elapsed time for writing on the disk.
 long elapsedReadNanos
          Total elapsed time for reads.
 long elapsedWriteNanos
          Total elapsed time for writes.
 long maxReadSize
          The size of the largest record read.
 long maxWriteSize
          The size of the largest record written.
 long ncacheFlush
          #of times the write cache was flushed to disk.
 long ncacheRead
          #of read requests that are satisfied by our write cache (vs the OS or disk level write cache).
 long ncacheWrite
          #of write requests that are absorbed by our write cache (vs the OS or disk level write cache).
 long ndiskRead
          #of read requests that read through to the backing file.
 long ndiskWrite
          #of write requests that write through to the backing file.
 long nforce
          #of times the data were forced to the disk.
 long nreads
          #of read requests.
 long nreopen
          #of times the file has been reopened after it was closed by an interrupt.
 long ntruncate
          #of times the length of the file was changed (typically, extended).
 long nwriteRootBlock
          #of times one of the root blocks has been written.
 long nwrites
          #of write requests.
 
Constructor Summary
DiskOnlyStrategy.StoreCounters()
          Initialize a new set of counters.
DiskOnlyStrategy.StoreCounters(DiskOnlyStrategy.StoreCounters o)
          Copy ctor.
 
Method Summary
 void add(DiskOnlyStrategy.StoreCounters o)
          Adds counters to the current counters.
 CounterSet getCounters()
           
 DiskOnlyStrategy.StoreCounters subtract(DiskOnlyStrategy.StoreCounters o)
          Returns a new DiskOnlyStrategy.StoreCounters containing the current counter values minus the given counter values.
 String toString()
          Human readable representation of the counters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nreads

public long nreads
#of read requests.


ncacheRead

public long ncacheRead
#of read requests that are satisfied by our write cache (vs the OS or disk level write cache).


ndiskRead

public long ndiskRead
#of read requests that read through to the backing file.


bytesRead

public long bytesRead
#of bytes read.


bytesReadFromDisk

public long bytesReadFromDisk
#of bytes that have been read from the disk.


maxReadSize

public long maxReadSize
The size of the largest record read.


elapsedReadNanos

public long elapsedReadNanos
Total elapsed time for reads.


elapsedCacheReadNanos

public long elapsedCacheReadNanos
Total elapsed time checking the disk write cache for records to be read.


elapsedDiskReadNanos

public long elapsedDiskReadNanos
Total elapsed time for reading on the disk.


nwrites

public long nwrites
#of write requests.


ncacheWrite

public long ncacheWrite
#of write requests that are absorbed by our write cache (vs the OS or disk level write cache).


ncacheFlush

public long ncacheFlush
#of times the write cache was flushed to disk.


ndiskWrite

public long ndiskWrite
#of write requests that write through to the backing file.


maxWriteSize

public long maxWriteSize
The size of the largest record written.


bytesWritten

public long bytesWritten
#of bytes written.


bytesWrittenOnDisk

public long bytesWrittenOnDisk
#of bytes that have been written on the disk.


elapsedWriteNanos

public long elapsedWriteNanos
Total elapsed time for writes.


elapsedCacheWriteNanos

public long elapsedCacheWriteNanos
Total elapsed time writing records into the cache (does not count time to flush the cache when it is full or to write records that do not fit in the cache directly to the disk).


elapsedDiskWriteNanos

public long elapsedDiskWriteNanos
Total elapsed time for writing on the disk.


nforce

public long nforce
#of times the data were forced to the disk.


ntruncate

public long ntruncate
#of times the length of the file was changed (typically, extended).


nreopen

public long nreopen
#of times the file has been reopened after it was closed by an interrupt.


nwriteRootBlock

public long nwriteRootBlock
#of times one of the root blocks has been written.

Constructor Detail

DiskOnlyStrategy.StoreCounters

public DiskOnlyStrategy.StoreCounters()
Initialize a new set of counters.


DiskOnlyStrategy.StoreCounters

public DiskOnlyStrategy.StoreCounters(DiskOnlyStrategy.StoreCounters o)
Copy ctor.

Parameters:
o -
Method Detail

add

public void add(DiskOnlyStrategy.StoreCounters o)
Adds counters to the current counters.

Parameters:
o -

subtract

public DiskOnlyStrategy.StoreCounters subtract(DiskOnlyStrategy.StoreCounters o)
Returns a new DiskOnlyStrategy.StoreCounters containing the current counter values minus the given counter values.

Parameters:
o -
Returns:

getCounters

public CounterSet getCounters()

toString

public String toString()
Human readable representation of the counters.

Overrides:
toString in class Object


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.