Example #1
0
File: SQI.cs Project: cessor/MTSS12
 private void SetCommonKnowledge(PreparedMetricsReport metrics)
 {
     sqiParameters.Classes = metrics.CommonKnowledge.NumberOfClasses;
     sqiParameters.Methods = metrics.CommonKnowledge.NumberOfMethods;
     sqiParameters.Namespaces = metrics.CommonKnowledge.NumberOfNamespaces;
     sqiParameters.Rloc = metrics.CommonKnowledge.RelevantLinesOfCode;
 }
Example #2
0
File: SQI.cs Project: cessor/MTSS12
 private void SetReportParameters(PreparedMetricsReport metrics)
 {
     _NamespacesInCycles.Value = SqiParameterType.Number(metrics.NumberOfNamespacesInCycleHotspots.Count());
     _ComplicatedMethods.Value = SqiParameterType.Number(metrics.Hotspots.OfCyclomaticComplexityOver(5).Count());
     _AverageComponentDependency.Value = SqiParameterType.Percentage(metrics.Rated.AverageComponentDependency);
     _BigClasses.Value = SqiParameterType.Number(metrics.Hotspots.OfClassSizeOver(20).Count());
     _BigMethods.Value = SqiParameterType.Number(metrics.Hotspots.OfMethodLengthOver(15).Count());
 }
Example #3
0
 private void SetACD(PreparedMetricsReport metrics)
 {
     _AverageComponentDependency.Update(
         metrics.Rated.AverageComponentDependency,
         metrics.CommonKnowledge.NumberOfClasses,
         metrics.CumulativeComponentDependencyHotspots.Count(),
         metrics.CumulativeComponentDependencyHistogram.GeometricalFit.Parameter);
 }
Example #4
0
 private void SetClassSize(PreparedMetricsReport metrics)
 {
     _ClassSize.Update(
         metrics.Rated.AverageRatedClassSize,
         metrics.CommonKnowledge.NumberOfClasses,
         metrics.ClassSizeHotspots.Count(),
         metrics.ClassSizeHistogram.GeometricalFit.Parameter);
 }
Example #5
0
 private void OnAnalysisFinished(PreparedMetricsReport m)
 {
     if (m != null) AnalysisFinished(m);
     Dispatch(() =>
     {
         AnalysisRunning = false;
         Changed(() => AnalysisRunning);
     });
 }
Example #6
0
 protected override void AnalysisFinished(PreparedMetricsReport metrics)
 {
     Dispatch(() =>
     {
         SetACD(metrics);
         SetClassSize(metrics);
         SetCyclomaticComplexity(metrics);
         SetMethodLength(metrics);
         SetNumberOfNonStaticPublicFields(metrics);
         SetNamespacesWithCycles(metrics);
         SetFooter(metrics);
     });
 }
Example #7
0
 protected override void AnalysisFinished(PreparedMetricsReport metrics)
 {
     base.AnalysisFinished(metrics);
     Dispatch(() => SetCumulativeComponentDependenciesText(metrics.CommonKnowledge));
 }
Example #8
0
 protected override void AnalysisFinished(PreparedMetricsReport metrics)
 {
     ClassSizesText = Fit(HistogramOf(ClassSizes, metrics.ClassSizeHistogram));
     CumulativeComponentDependenciesText = Fit(HistogramOf(CumulativeComponentDependencies, metrics.CumulativeComponentDependencyHistogram));
     CyclomaticComplexitiesText = Fit(HistogramOf(CyclomaticComplexities, metrics.CyclomaticComplexityHistogram));
     MethodLengthsText = Fit(HistogramOf(MethodLengths, metrics.MethodLengthHistogram));
     NamespacesInCycleText = Fit(HistogramOf(NamespacesInCycle, metrics.NumberOfNamespacesInCycleHistogram));
     NonStaticPublicFieldsText = Fit(HistogramOf(NonStaticPublicFields, metrics.NumberOfNonStaticPublicFieldsHistogram));
     ChangeAllTexts();
 }
Example #9
0
 protected override void AnalysisFinished(PreparedMetricsReport metrics)
 {
     this.metrics = metrics;
 }
Example #10
0
 private void SetCyclomaticComplexity(PreparedMetricsReport metrics)
 {
     _CyclomaticComplexity.Update(
         metrics.Rated.AverageRatedCyclomaticComplexity,
         metrics.CommonKnowledge.NumberOfMethods,
         metrics.CyclomaticComplexityHotspots.Count(),
         metrics.CyclomaticComplexityHistogram.GeometricalFit.Parameter);
 }
Example #11
0
 private void SetNumberOfNonStaticPublicFields(PreparedMetricsReport metrics)
 {
     _NonStaticPublicFields.Update(
         metrics.Rated.AverageRatedNumberOfNonStaticPublicFields,
         metrics.CommonKnowledge.NumberOfClasses,
         metrics.NumberOfNonStaticPublicFieldsHotspots.Count(),
         metrics.NumberOfNonStaticPublicFieldsHistogram.GeometricalFit.Parameter);
 }
Example #12
0
 private void SetNamespacesWithCycles(PreparedMetricsReport metrics)
 {
     _NamespacesWithCycles.Update(
         metrics.Rated.NamespacesWithCyclicDependencies,
         metrics.CommonKnowledge.NumberOfNamespaces,
         metrics.NumberOfNamespacesInCycleHotspots.Count(),
         metrics.NumberOfNamespacesInCycleHistogram.GeometricalFit.Parameter);
 }
Example #13
0
 private void SetMethodLength(PreparedMetricsReport metrics)
 {
     _MethodLength.Update(
         metrics.Rated.AverageRatedMethodLength,
         metrics.CommonKnowledge.NumberOfMethods,
         metrics.MethodLengthHotspots.Count(),
         metrics.MethodLengthHistogram.GeometricalFit.Parameter);
 }
Example #14
0
 private void SetFooter(PreparedMetricsReport metrics)
 {
     Rloc = string.Format("{0} Relevant Lines Of Code", metrics.CommonKnowledge.RelevantLinesOfCode);
     Changed(() => Rloc);
     LastMetricsTime = string.Format("  ({0})", DateTime.Now.ToShortTimeString());
     Changed(() => LastMetricsTime);
 }
Example #15
0
 protected abstract void AnalysisFinished(PreparedMetricsReport metrics);