FilWisher/distributed-project

View on GitHub
icarus/examples/JSON_results_test/plotresults.py

Summary

Maintainability
C
1 day
Test Coverage

File plotresults.py has 297 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/env python
"""Plot results read from a result set
"""
from __future__ import division
import os
Severity: Minor
Found in icarus/examples/JSON_results_test/plotresults.py - About 3 hrs to fix

    Function run has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

    def run(config, results, plotdir):
        """Run the plot script
        
        Parameters
        ----------
    Severity: Minor
    Found in icarus/examples/JSON_results_test/plotresults.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function plot_cache_hits_vs_alpha has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def plot_cache_hits_vs_alpha(resultset, topology, cache_size, alpha_range, strategies, plotdir):
    Severity: Minor
    Found in icarus/examples/JSON_results_test/plotresults.py - About 45 mins to fix

      Function plot_latency_vs_alpha has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def plot_latency_vs_alpha(resultset, topology, cache_size, alpha_range, strategies, plotdir):
      Severity: Minor
      Found in icarus/examples/JSON_results_test/plotresults.py - About 45 mins to fix

        Function plot_cache_hits_vs_cache_size has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def plot_cache_hits_vs_cache_size(resultset, topology, alpha, cache_size_range, strategies, plotdir):
        Severity: Minor
        Found in icarus/examples/JSON_results_test/plotresults.py - About 45 mins to fix

          Function plot_latency_vs_cache_size has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def plot_latency_vs_cache_size(resultset, topology, alpha, cache_size_range, strategies, plotdir):
          Severity: Minor
          Found in icarus/examples/JSON_results_test/plotresults.py - About 45 mins to fix

            Function plot_link_load_vs_topology has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def plot_link_load_vs_topology(resultset, alpha, cache_size, topology_range, strategies, plotdir):
            Severity: Minor
            Found in icarus/examples/JSON_results_test/plotresults.py - About 45 mins to fix

              Function plot_link_load_vs_cache_size has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def plot_link_load_vs_cache_size(resultset, topology, alpha, cache_size_range, strategies, plotdir):
              Severity: Minor
              Found in icarus/examples/JSON_results_test/plotresults.py - About 45 mins to fix

                Function plot_cache_hits_vs_topology has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def plot_cache_hits_vs_topology(resultset, alpha, cache_size, topology_range, strategies, plotdir):
                Severity: Minor
                Found in icarus/examples/JSON_results_test/plotresults.py - About 45 mins to fix

                  Function plot_link_load_vs_alpha has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def plot_link_load_vs_alpha(resultset, topology, cache_size, alpha_range, strategies, plotdir):
                  Severity: Minor
                  Found in icarus/examples/JSON_results_test/plotresults.py - About 45 mins to fix

                    There are no issues that match your filters.

                    Category
                    Status