< Summary

Class:Analytics
Assembly:Analytics
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/ServiceProviders/Analytics/Analytics.cs
Covered lines:1
Uncovered lines:5
Coverable lines:6
Total lines:24
Line coverage:16.6% (1 of 6)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
SendAnalytic(...)0%6200%
SendToSegment(...)0%6200%
Dispose()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/ServiceProviders/Analytics/Analytics.cs

#LineLine coverage
 1using System.Collections.Generic;
 2using System.Linq;
 3using DCL.Interface;
 4using Newtonsoft.Json;
 5
 6/// <summary>
 7/// For the events we use the convention of all lower cases and "_" instead of space
 8/// </summary>
 9public class Analytics : IAnalytics
 10{
 11    private static bool VERBOSE = false;
 12
 13    public void SendAnalytic(string eventName, Dictionary<string, string> data)
 14    {
 015        if (VERBOSE)
 016            UnityEngine.Debug.Log($"{eventName}:\n{JsonConvert.SerializeObject(data, Formatting.Indented)}");
 17
 018        SendToSegment(eventName, data);
 019    }
 20
 021    internal void SendToSegment(string eventName, Dictionary<string, string> data) { WebInterface.ReportAnalyticsEvent(e
 22
 12223    public void Dispose() { }
 24}