Ejemplo n.º 1
0
        public IActionResult Index()
        {
            var sessions = JArray.Parse(System.IO.File.ReadAllText(@"D:\User\Desktop\response_1589728162482.json"));

            var results = ParserManager.ParseTestResults(sessions);

            HierarchicalClustering.ComputeMultiple(0.5f, results.Clusters);
            Log.Information("Tests count: {tcount}, clusters count {ccount}, cluster depth: {depth}",
                            results.Clusters.Count, HierarchicalClustering.Output.Count, HierarchicalClustering.Output.Max(c => c.Depth));

            ViewBag.Width   = HierarchicalClustering.Output.Max(c => c.Depth) * 150 + 460;
            ViewBag.Height  = results.Clusters.Count * 30;
            ViewBag.Cluster = ClusterSerializer.Serialize(HierarchicalClustering.Output);
            return(View());
        }