public void Should_send_message() { var statsdClient = new StatsdClient("localhost", 1234); var r = new Result("name", System.DateTime.Now, "path"); r.SetValue(12); statsdClient.Send(r); }
public void ShouldGenerateFeatureSpecificGateOperationTimerMetricWhenTestingFeature() { Flipper.Feature("Stats").EnableActor(FlipperActor); Flipper.Feature("Stats").IsEnabledFor(FlipperActor); StatsdClient.AssertWasCalled(x => x.LogTiming(Arg <string> .Is.Equal("flipper.feature.Stats.gate_operation.boolean.open"), Arg <long> .Is.Anything)); }
public void TestFeatureMetricsForTestingFeature(string counterName) { Feature.IsEnabledFor(FlipperActor); StatsdClient.AssertWasCalled(x => x.LogTiming(Arg <string> .Is.Equal("flipper.feature_operation.enabled"), Arg <long> .Is.Anything)); StatsdClient.AssertWasCalled(x => x.LogCount(counterName)); }
public void ShouldGenerateFeatureSpecificGateOperationTimerMetricWhenTestingFeature(string gateName, string state) { Flipper.Feature("Stats").EnableActor(FlipperActor); Flipper.Feature("Stats").IsEnabledFor(FlipperActor); var expectedStatName = string.Format("flipper.feature.Stats.gate.{0}.{1}", gateName, state); StatsdClient.AssertWasCalled(x => x.LogCount(expectedStatName)); }
public void Should_create_statsd_client_uppercase() { var client = new StatsdClient { Hostname = "localhost", Port = 8125, ClientName = "STATSDCLIENT" }; var o = clientFactory.Create(client); Assert.That(o, Is.Not.Null); Assert.That(o, Is.TypeOf(typeof(StatsdClient))); Assert.That(o, Is.TypeOf<StatsdClient>()); }
private void SendSingle(string command) { try { StatsdClient.Send(command); } catch (Exception e) { Debug.WriteLine(e.Message); } }
public void Send() { try { StatsdClient.Send(string.Join("\n", Commands.ToArray())); Commands = new List <string>(); } catch (Exception e) { Debug.WriteLine(e.Message); } }
public void Send() { try { StatsdClient.Send(string.Join("\n", Commands.ToArray())); AtomicallyClearQueue(); } catch (Exception e) { Debug.WriteLine(e.Message); } }
private async Task SendSingleAsync(MemoryString command) { try { await StatsdClient.SendAsync(command.Memory.Span).ConfigureAwait(false); } catch (Exception e) { Debug.WriteLine(e.Message); } finally { command.Dispose(); } }
public void Should_send_message() { var statsdClient = new StatsdClient("localhost", 1234); statsdClient.Send(new Result(12, "name", System.DateTime.Now, "path")); }
public NumberSerialzationTest() { _channel = new LoggingChannel(); _client = new StatsdClient(_channel); }
public PrefixedStatsdClientTests() { _channel = new LoggingChannel(); _client = new StatsdClient(_channel, "custom.prefix"); }
public StatsdClientTests() { _channel = new LoggingChannel(); _client = new StatsdClient(_channel); }
public void TestAdapterMetricsForTestingFeature() { Flipper.Feature("Name").IsEnabledFor(FlipperActor); StatsdClient.AssertWasCalled(x => x.LogTiming(Arg <string> .Is.Equal("flipper.adapter.memory.get"), Arg <long> .Is.Anything)); }
public void ShouldCreateAFeatureTimerMetricWhenDisablingFeature() { Flipper.Feature("Name").DisableActor(FlipperActor); StatsdClient.AssertWasCalled(x => x.LogTiming(Arg <string> .Is.Equal("flipper.adapter.memory.disable"), Arg <long> .Is.Anything)); }
public void ShouldCreateAFeatureTimerMetricWhenDisablingFeature() { Feature.DisableActor(FlipperActor); StatsdClient.AssertWasCalled(x => x.LogTiming(Arg <string> .Is.Equal("flipper.feature_operation.disable"), Arg <long> .Is.Anything)); }