Пример #1
0
        private void AutoPatternCommandHandler()
        {
            ILogTree logTree = new BasicLogTree();

            Output.Clear();
            Output.AddRange(logTree.ExtractPatternOutput());
        }
Пример #2
0
        private async void AnalyzeCommandHandler()
        {
            ILogTree logTree  = new BasicLogTree();
            var      clusters = logTree.BuildLogTree();

            int logIndexTemp = 0;

            foreach (var item in logTree.GetAllLogLines().Select((x) => new DisplayPattern {
                Pattern = x, LogIndex = logIndexTemp++
            }))
            {
                RawLogCollection.Add(item);
            }

            foreach (var item in clusters)
            {
                var clusterObject = new DisplayPattern
                {
                    Pattern               = item.PatternLine,
                    Level                 = item.Level,
                    RepresentativeIndex   = item.ClusterInfo.RepresentativeIndex,
                    RepresentativeLogLine = item.Line.Line
                };
                clusterObject.AllIndexesinClusterString = item.ClusterInfo.AllIndexesInCluster.Select(t => t.ToString()).
                                                          Aggregate((x, y) => x + "," + y);
                PatternsCollection.Add(clusterObject);
            }

            ClusterSummary = string.Format("{0} unique cluster patterns found", clusters.Count);
            //LineNode tempNode = lineNode;

            //while (tempNode != null)
            //{
            //    PatternsCollection.Add(new DisplayPattern { Pattern = tempNode.PatternLine });
            //    tempNode = tempNode.RightSiblingNode;
            //}
        }