Photon Server API
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ExitGames.Diagnostics.Monitoring.Protocol.StatsD.Text.StatsDTextWriter Class Reference

StatsD Metric Types https://github.com/etsy/statsd/blob/master/docs/metric_types.md https://github.com/b/statsd_spec More...

Inheritance diagram for ExitGames.Diagnostics.Monitoring.Protocol.StatsD.Text.StatsDTextWriter:
ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase ExitGames.Diagnostics.Monitoring.Protocol.ICounterSampleWriter

Public Member Functions

 StatsDTextWriter (int maxQueueLength, ISocketSender socket)
 
 StatsDTextWriter (int minPayloadSize, int maxPayloadSize, int serializationBufferSize, int maxQueueLength, ISocketSender socket)
 
 StatsDTextWriter (PacketWriterSettings s)
 
override void Publish (CounterSampleCollection[] packages)
 Called by CounterSampleSenderBase to write samples out to some storage. More...
 
virtual string GetKey (CounterSampleCollection c)
 
virtual void Serialize (StreamWriter w, string key, CounterSample s)
 
- Public Member Functions inherited from ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase
virtual void Start (CounterSampleSenderBase sender)
 Start writing. Stop is handled by IDisposable implementation. Can be called once. More...
 
void Dispose ()
 
void EnqueueData (byte[] data)
 

Static Public Member Functions

static TimeSpan GetUnixTimestamp (DateTime dt)
 
- Static Public Member Functions inherited from ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase
static ISocketSender CreateSender (CounterSampleSenderSettings s)
 

Public Attributes

const char Separator = '.'
 
- Public Attributes inherited from ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase
const int DefaultMaxQueueLength = 120
 
readonly int MaxQueueLength = DefaultMaxQueueLength
 Gets a value indicating how many packages should be enqueued for republishing if an error occurred during publishing. The default value is 120. More...
 
readonly LinkedList< byte[]> SendQueue = new LinkedList<byte[]>()
 

Static Public Attributes

static readonly DateTime Epoch = new DateTime(1970, 1, 1)
 

Additional Inherited Members

- Protected Member Functions inherited from ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase
 PhotonBinaryWriterBase (int maxQueueLength, ISocketSender socket)
 
 PhotonBinaryWriterBase (CounterSampleSenderSettings s)
 
virtual void Dispose (bool disposing)
 
- Properties inherited from ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase
int QueuedDataSize [get]
 Gets the size of the queued data in bytes. More...
 
bool Ready [get]
 
string SenderId [get]
 
- Properties inherited from ExitGames.Diagnostics.Monitoring.Protocol.ICounterSampleWriter
bool Ready [get]
 Is writer ready to publish any data. IsConnected status is subset of this status. Default implementation is writer started and connected. More...
 

Detailed Description

StatsD Metric Types https://github.com/etsy/statsd/blob/master/docs/metric_types.md https://github.com/b/statsd_spec

The format of exported metrics is UTF-8 text, with metrics separated by newlines. Metrics are generally of the form <metric name>="">:

|<type>, with exceptions noted in the metric type definitions below.

The protocol allows for both integer and floating point values. Most implementations store values internally as a IEEE 754 double precision float, but many implementations and graphing systems only support integer values. For compatibility all values should be integers in the range (-2^53^, 2^53^).

Constructor & Destructor Documentation

ExitGames.Diagnostics.Monitoring.Protocol.StatsD.Text.StatsDTextWriter.StatsDTextWriter ( int  maxQueueLength,
ISocketSender  socket 
)
inline
ExitGames.Diagnostics.Monitoring.Protocol.StatsD.Text.StatsDTextWriter.StatsDTextWriter ( int  minPayloadSize,
int  maxPayloadSize,
int  serializationBufferSize,
int  maxQueueLength,
ISocketSender  socket 
)
inline
ExitGames.Diagnostics.Monitoring.Protocol.StatsD.Text.StatsDTextWriter.StatsDTextWriter ( PacketWriterSettings  s)
inline

Member Function Documentation

virtual string ExitGames.Diagnostics.Monitoring.Protocol.StatsD.Text.StatsDTextWriter.GetKey ( CounterSampleCollection  c)
inlinevirtual
static TimeSpan ExitGames.Diagnostics.Monitoring.Protocol.StatsD.Text.StatsDTextWriter.GetUnixTimestamp ( DateTime  dt)
inlinestatic
override void ExitGames.Diagnostics.Monitoring.Protocol.StatsD.Text.StatsDTextWriter.Publish ( CounterSampleCollection[]  packages)
inlinevirtual

Called by CounterSampleSenderBase to write samples out to some storage.

Reimplemented from ExitGames.Diagnostics.Monitoring.Protocol.PhotonBinaryWriterBase.

virtual void ExitGames.Diagnostics.Monitoring.Protocol.StatsD.Text.StatsDTextWriter.Serialize ( StreamWriter  w,
string  key,
CounterSample  s 
)
inlinevirtual

Member Data Documentation

readonly DateTime ExitGames.Diagnostics.Monitoring.Protocol.StatsD.Text.StatsDTextWriter.Epoch = new DateTime(1970, 1, 1)
static
const char ExitGames.Diagnostics.Monitoring.Protocol.StatsD.Text.StatsDTextWriter.Separator = '.'