distributed-system-analysis/run-perf

View on GitHub

Showing 67 of 84 total issues

Function process has a Cognitive Complexity of 12 (exceeds 6 allowed). Consider refactoring.
Open

def process(path_glob, variant, out, average):
    """Process single variant"""
    safe_variant = variant.replace('-', '')
    out.write(CHART1 % (variant, variant, safe_variant, variant, safe_variant,
                        safe_variant))
Severity: Minor
Found in contrib/data_analysis/extract_data.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 __init__ has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def __init__(self, host, name, distro, base_image, smp, mem,
Severity: Major
Found in runperf/machine.py - About 1 hr to fix

    Function get_merged_name has a Cognitive Complexity of 11 (exceeds 6 allowed). Consider refactoring.
    Open

        def get_merged_name(self, merge):
            """
            Report full test name but replace parts specified in "merge" wiht '*'
            """
            if not merge:
    Severity: Minor
    Found in runperf/result.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 __init__ has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def __init__(self, log, tolerance, stddev_tolerance, models,
    Severity: Major
    Found in runperf/result.py - About 1 hr to fix

      Function write_file has a Cognitive Complexity of 10 (exceeds 6 allowed). Consider refactoring.
      Open

      def write_file(path, content, mode='w'):
          """
          Write content to path, create the necessary upper dirs
          """
          if not os.path.exists(path):
      Severity: Minor
      Found in runperf/utils/__init__.py - About 55 mins 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 ssh_copy_id has a Cognitive Complexity of 10 (exceeds 6 allowed). Consider refactoring.
      Open

      def ssh_copy_id(log, addr, passwords, hop=None):
          """
          Use "ssh-copy-id" to copy ssh id, try passwords if asked for.
          """
          session = None
      Severity: Minor
      Found in runperf/utils/__init__.py - About 55 mins 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 add_bad has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def add_bad(self, suffix, name, details, difference, weight, src=None):
      Severity: Major
      Found in runperf/result.py - About 50 mins to fix

        Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(self, parent_log, name, addr, distro, args, hop=None):
        Severity: Major
        Found in runperf/machine.py - About 50 mins to fix

          Function __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def __init__(self, log, mean_tolerance, stddev_tolerance, models,
          Severity: Major
          Found in runperf/result.py - About 50 mins to fix

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

                def for_each_host_retry(self, attempts, hosts, method, args=tuple(),
            Severity: Minor
            Found in runperf/machine.py - About 45 mins to fix

              Function check_result has a Cognitive Complexity of 9 (exceeds 6 allowed). Consider refactoring.
              Open

                  def check_result(self, test_name, src, dst):
                      model = self.model.get(test_name)
                      if model is None:
                          return []
                      equation = model["equation"]
              Severity: Minor
              Found in runperf/result.py - About 45 mins 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 _image_up_to_date has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def _image_up_to_date(self, session, pubkey, image, setup_script,
              Severity: Minor
              Found in runperf/profiles.py - About 45 mins to fix

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

                    def __init__(self, distro, arch, pub_key, base_path, session,
                Severity: Minor
                Found in runperf/utils/cloud_image_providers.py - About 45 mins to fix

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

                      def add(self, suffix, name, difference, weight, src=None):
                  Severity: Minor
                  Found in runperf/result.py - About 45 mins to fix

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

                        def __init__(self, host, workers, base_output_path, metadata, extra):
                    Severity: Minor
                    Found in runperf/tests.py - About 45 mins to fix

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

                          def __init__(self, host, workers, base_output_path, metadata, extra):
                      Severity: Minor
                      Found in runperf/tests.py - About 45 mins to fix

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

                            def __init__(self, host, workers, base_output_path, metadata, extra):
                        Severity: Minor
                        Found in runperf/tests.py - About 45 mins to fix

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

                              def __init__(self, host, workers, base_output_path, metadata, extra):
                          Severity: Minor
                          Found in runperf/tests.py - About 45 mins to fix

                            Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def __init__(self, host, workers, base_output_path, metadata, extra):
                            Severity: Minor
                            Found in runperf/tests.py - About 35 mins to fix

                              Function wait_for has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def wait_for(func, timeout, step=1.0, args=None, kwargs=None):
                              Severity: Minor
                              Found in runperf/utils/__init__.py - About 35 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language