Skip to content
This repository has been archived by the owner on Mar 26, 2019. It is now read-only.

Commit

Permalink
updating appmetrics packages to latest dev build versions
Browse files Browse the repository at this point in the history
  • Loading branch information
alhardy committed Jan 31, 2017
1 parent c0ec23b commit eb2390c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void ReportHealth(
WriteLine(typeof(HealthStatus).HumanzeEndMetricType());
}

public void ReportMetric<T>(string context, MetricValueSource<T> valueSource)
public void ReportMetric<T>(string context, MetricValueSourceBase<T> valueSource)
{
_logger.LogDebug("Writing Metric {T} for Console", typeof(T));

Expand Down
2 changes: 1 addition & 1 deletion src/App.Metrics.Extensions.Reporting.Console/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"copyright": "Allan Hardy 2016",

"dependencies": {
"App.Metrics": "1.0.0-beta5-build00244",
"App.Metrics": "1.0.0-beta5-build00260",
"Microsoft.Extensions.Logging.Console": "1.1.0",
"StyleCop.Analyzers": {
"version": "1.0.0",
Expand Down
26 changes: 13 additions & 13 deletions src/App.Metrics.Extensions.Reporting.InfluxDB/InfluxDbReporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,43 +150,43 @@ public void ReportHealth(
_logger.LogDebug($"Packed Health Checks for {Name}");
}

public void ReportMetric<T>(string context, MetricValueSource<T> valueSource)
public void ReportMetric<T>(string context, MetricValueSourceBase<T> valueSource)
{
_logger.LogDebug($"Packing Metric {typeof(T)} for {Name}");

if (typeof(T) == typeof(double))
{
ReportGauge(context, valueSource as MetricValueSource<double>);
ReportGauge(context, valueSource as MetricValueSourceBase<double>);
return;
}

if (typeof(T) == typeof(CounterValue))
{
ReportCounter(context, valueSource as MetricValueSource<CounterValue>);
ReportCounter(context, valueSource as MetricValueSourceBase<CounterValue>);
return;
}

if (typeof(T) == typeof(MeterValue))
{
ReportMeter(context, valueSource as MetricValueSource<MeterValue>);
ReportMeter(context, valueSource as MetricValueSourceBase<MeterValue>);
return;
}

if (typeof(T) == typeof(TimerValue))
{
ReportTimer(context, valueSource as MetricValueSource<TimerValue>);
ReportTimer(context, valueSource as MetricValueSourceBase<TimerValue>);
return;
}

if (typeof(T) == typeof(HistogramValue))
{
ReportHistogram(context, valueSource as MetricValueSource<HistogramValue>);
ReportHistogram(context, valueSource as MetricValueSourceBase<HistogramValue>);
return;
}

if (typeof(T) == typeof(ApdexValue))
{
ReportApdex(context, valueSource as MetricValueSource<ApdexValue>);
ReportApdex(context, valueSource as MetricValueSourceBase<ApdexValue>);
return;
}

Expand All @@ -200,7 +200,7 @@ public void StartReportRun(IMetrics metrics)
_payloadBuilder.Init();
}

private void ReportApdex(string name, MetricValueSource<ApdexValue> valueSource)
private void ReportApdex(string name, MetricValueSourceBase<ApdexValue> valueSource)
{
var apdexValueSource = valueSource as ApdexValueSource;

Expand All @@ -219,7 +219,7 @@ private void ReportApdex(string name, MetricValueSource<ApdexValue> valueSource)
_payloadBuilder.Pack(_metricNameFormatter(name, valueSource.Name), keys, values, valueSource.Tags);
}

private void ReportCounter(string name, MetricValueSource<CounterValue> valueSource)
private void ReportCounter(string name, MetricValueSourceBase<CounterValue> valueSource)
{
var counterValueSource = valueSource as CounterValueSource;

Expand Down Expand Up @@ -255,15 +255,15 @@ private void ReportCounter(string name, MetricValueSource<CounterValue> valueSou
_payloadBuilder.Pack(_metricNameFormatter(name, valueSource.Name), count, valueSource.Tags);
}

private void ReportGauge(string name, MetricValueSource<double> valueSource)
private void ReportGauge(string name, MetricValueSourceBase<double> valueSource)
{
if (!double.IsNaN(valueSource.Value) && !double.IsInfinity(valueSource.Value))
{
_payloadBuilder.Pack(_metricNameFormatter(name, valueSource.Name), valueSource.Value, valueSource.Tags);
}
}

private void ReportHistogram(string name, MetricValueSource<HistogramValue> valueSource)
private void ReportHistogram(string name, MetricValueSourceBase<HistogramValue> valueSource)
{
var data = new Dictionary<string, object>();

Expand All @@ -275,7 +275,7 @@ private void ReportHistogram(string name, MetricValueSource<HistogramValue> valu
_payloadBuilder.Pack(_metricNameFormatter(name, valueSource.Name), keys, values, valueSource.Tags);
}

private void ReportMeter(string name, MetricValueSource<MeterValue> valueSource)
private void ReportMeter(string name, MetricValueSourceBase<MeterValue> valueSource)
{
var data = new Dictionary<string, object>();

Expand All @@ -302,7 +302,7 @@ private void ReportMeter(string name, MetricValueSource<MeterValue> valueSource)
_payloadBuilder.Pack(_metricNameFormatter(name, valueSource.Name), keys, values, valueSource.Tags);
}

private void ReportTimer(string name, MetricValueSource<TimerValue> valueSource)
private void ReportTimer(string name, MetricValueSourceBase<TimerValue> valueSource)
{
var data = new Dictionary<string, object>();

Expand Down
2 changes: 1 addition & 1 deletion src/App.Metrics.Extensions.Reporting.InfluxDB/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"copyright": "Allan Hardy 2016",

"dependencies": {
"App.Metrics": "1.0.0-beta5-build00244",
"App.Metrics": "1.0.0-beta5-build00260",
"Polly": "4.3.0",
"StyleCop.Analyzers": {
"version": "1.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void ReportHealth(
_logger.LogDebug($"Writing Health Checks for {Name}");
}

public void ReportMetric<T>(string context, MetricValueSource<T> valueSource)
public void ReportMetric<T>(string context, MetricValueSourceBase<T> valueSource)
{
_logger.LogDebug($"Start Writing Metric {typeof(T)} for {Name}");

Expand Down
2 changes: 1 addition & 1 deletion src/App.Metrics.Extensions.Reporting.TextFile/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"copyright": "Allan Hardy 2016",

"dependencies": {
"App.Metrics": "1.0.0-beta5-build00244",
"App.Metrics": "1.0.0-beta5-build00260",
"StyleCop.Analyzers": {
"version": "1.0.0",
"type": "build"
Expand Down

0 comments on commit eb2390c

Please sign in to comment.