Skip to content

Conversation

tux1337
Copy link

@tux1337 tux1337 commented Aug 25, 2018

Graphite API supports int and double values as input.
The changes are necessary that this implementation does also support double values and are able to send them to Graphite.

Support for "," and "." as decimal delimiter is a little bit dirty....

Support Double as input for Graphite Client
Copy link

@kirpigiller kirpigiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x

}

public void Send(string path, int value, DateTime timeStamp)
public void Send(string path, double value, DateTime timeStamp)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, it would be better to save int-methods also

public byte[] ToByteArray()
{
var line = string.Format("{0} {1} {2}\n", Path, Value, Timestamp);
var line = string.Format("{0} {1} {2}\n", Path, Convert.ToString(Value).Replace(",","."), Timestamp);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you think that target graphite server support dots?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants