org.apache.ignite.internal.visor.igfs

## Class VisorIgfsProfilerUniformityCounters

- java.lang.Object
- - org.apache.ignite.internal.visor.igfs.VisorIgfsProfilerUniformityCounters

All Implemented Interfaces:
  Serializable

    public class VisorIgfsProfilerUniformityCounters
    extends Object
    implements Serializable

Class to support uniformity calculation. Uniformity calculated as coefficient of variation. Count read frequency for each file and compare with ideal uniform distribution.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`VisorIgfsProfilerUniformityCounters()`

### Method Summary

Methods
`void` `aggregate(VisorIgfsProfilerUniformityCounters other)` Add given counters.
`double` `calc()` Calculate uniformity as standard deviation.
`void` `increment(long pos, long len)` Increment counters by given pos and length.
`void` `invalidate(long newFileSize)` Check if counters and blockSize should be adjusted according to file size.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### VisorIgfsProfilerUniformityCounters

    public VisorIgfsProfilerUniformityCounters()

### Method Detail

#### invalidate

    public void invalidate(long newFileSize)

Check if counters and blockSize should be adjusted according to file size.

Parameters:
  `newFileSize` - New size of file.

#### increment

    public void increment(long pos,
                 long len)

Increment counters by given pos and length.

Parameters:
  `pos` - Position in file.
  `len` - Read data length.

#### aggregate

    public void aggregate(VisorIgfsProfilerUniformityCounters other)

Add given counters.

Parameters:
  `other` - Counters to add.

#### calc

    public double calc()

Calculate uniformity as standard deviation. See: http://en.wikipedia.org/wiki/Standard_deviation.

Returns:
  Uniformity value as number in `0..1` range.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC1
Release Date | : February 17 2015