enclose-io/compiler

View on GitHub
lts/deps/v8/tools/run_perf.py

Summary

Maintainability
F
2 mos
Test Coverage

File run_perf.py has 917 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

"""
Severity: Major
Found in lts/deps/v8/tools/run_perf.py - About 2 days to fix

    Function Main has a Cognitive Complexity of 84 (exceeds 5 allowed). Consider refactoring.
    Open

    def Main(argv):
      parser = argparse.ArgumentParser()
      parser.add_argument('--arch',
                          help='The architecture to run tests for. Pass "auto" '
                          'to auto-detect.', default='x64',
    Severity: Minor
    Found in lts/deps/v8/tools/run_perf.py - About 1 day 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 Main has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def Main(argv):
      parser = argparse.ArgumentParser()
      parser.add_argument('--arch',
                          help='The architecture to run tests for. Pass "auto" '
                          'to auto-detect.', default='x64',
    Severity: Minor
    Found in lts/deps/v8/tools/run_perf.py - About 1 hr to fix

      Function __init__ has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def __init__(self, suite, parent, arch):
          super(GraphConfig, self).__init__()
          self._suite = suite
      
          assert isinstance(suite.get('path', []), list)
      Severity: Minor
      Found in lts/deps/v8/tools/run_perf.py - About 1 hr to fix

        Function FlattenRunnables has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

        def FlattenRunnables(node, node_cb):
          """Generator that traverses the tree structure and iterates over all
          runnables.
          """
          node_cb(node)
        Severity: Minor
        Found in lts/deps/v8/tools/run_perf.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 _Run has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

          def _Run(self, runnable, count, secondary=False):
            target_dir = 'bin_secondary' if secondary else 'bin'
            self.driver.drop_ram_caches()
        
            # Relative path to benchmark directory.
        Severity: Minor
        Found in lts/deps/v8/tools/run_perf.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

        Avoid deeply nested control flow statements.
        Open

                      while not result_tracker.HasEnoughRuns(
                          runnable, args.confidence_level):
                        yield counter
                        counter += 1
                    else:
        Severity: Major
        Found in lts/deps/v8/tools/run_perf.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                      while attempts_left:
                        total_duration = time.time() - start
                        if total_duration > args.max_total_duration:
                          logging.info(
                              '>>> Stopping now since running for too long (%ds > %ds)',
          Severity: Major
          Found in lts/deps/v8/tools/run_perf.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                          for i in range(0, max(1, args.run_count or runnable.run_count)):
                            yield i
            
            
            Severity: Major
            Found in lts/deps/v8/tools/run_perf.py - About 45 mins to fix

              Function ProcessOutput has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                def ProcessOutput(self, output, result_tracker, count):
                  """Processes test run output and updates result tracker.
              
                  Args:
                    output: Output object from the test run.
              Severity: Minor
              Found in lts/deps/v8/tools/run_perf.py - About 35 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 MakeGraphConfig has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              def MakeGraphConfig(suite, arch, parent):
                """Factory method for making graph configuration objects."""
                if isinstance(parent, RunnableConfig):
                  # Below a runnable can only be traces.
                  return TraceConfig(suite, parent, arch)
              Severity: Minor
              Found in lts/deps/v8/tools/run_perf.py - About 35 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 ConsumeOutput has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                def ConsumeOutput(self, output, result_tracker):
                  """Extracts trace results from the output.
              
                  Args:
                    output: Output object from the test run.
              Severity: Minor
              Found in lts/deps/v8/tools/run_perf.py - About 35 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 _Run has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                def _Run(self, runnable, count, secondary=False):
                  shell_dir = self.shell_dir_secondary if secondary else self.shell_dir
                  cmd = runnable.GetCommand(self.command_prefix, shell_dir, self.extra_flags)
                  output = cmd.execute()
              
              
              Severity: Minor
              Found in lts/deps/v8/tools/run_perf.py - About 35 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

              Avoid too many return statements within this function.
              Open

                    return INFRA_FAILURE_RETCODE
              Severity: Major
              Found in lts/deps/v8/tools/run_perf.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                  return 0
                Severity: Major
                Found in lts/deps/v8/tools/run_perf.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return 1
                  Severity: Major
                  Found in lts/deps/v8/tools/run_perf.py - About 30 mins to fix

                    Function __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def __init__(self, args):
                        super(DesktopPlatform, self).__init__(args)
                        self.command_prefix = []
                    
                        # Setup command class to OS specific version.
                    Severity: Minor
                    Found in lts/deps/v8/tools/run_perf.py - About 25 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 PreTests has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                    Open

                      def PreTests(self, node, path):
                        if isinstance(node, RunnableConfig):
                          node.ChangeCWD(path)
                        suite_dir = os.path.abspath(os.path.dirname(path))
                        if node.path:
                    Severity: Minor
                    Found in lts/deps/v8/tools/run_perf.py - About 25 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

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    def Main(argv):
                      parser = argparse.ArgumentParser()
                      parser.add_argument('--arch',
                                          help='The architecture to run tests for. Pass "auto" '
                                          'to auto-detect.', default='x64',
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 2 wks to fix
                    current/deps/v8/tools/run_perf.py on lines 877..1119

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 1419.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    class ResultTracker(object):
                      """Class that tracks trace/runnable results and produces script output.
                    
                      The output is structured like this:
                      {
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 6 days to fix
                    current/deps/v8/tools/run_perf.py on lines 158..273

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 680.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    class CustomMachineConfiguration:
                      def __init__(self, disable_aslr = False, governor = None):
                        self.aslr_backup = None
                        self.governor_backup = None
                        self.disable_aslr = disable_aslr
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 6 days to fix
                    current/deps/v8/tools/run_perf.py on lines 767..868

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 673.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    class GraphConfig(Node):
                      """Represents a suite definition.
                    
                      Can either be a leaf or an inner node that provides default values.
                      """
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 5 days to fix
                    current/deps/v8/tools/run_perf.py on lines 330..390

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 584.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    class AndroidPlatform(Platform):  # pragma: no cover
                    
                      def __init__(self, args):
                        super(AndroidPlatform, self).__init__(args)
                        self.driver = android.android_driver(args.device)
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 5 days to fix
                    current/deps/v8/tools/run_perf.py on lines 692..764

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 555.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    class Platform(object):
                      def __init__(self, args):
                        self.shell_dir = args.shell_dir
                        self.shell_dir_secondary = args.shell_dir_secondary
                        self.extra_flags = args.extra_flags.split()
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 3 days to fix
                    current/deps/v8/tools/run_perf.py on lines 578..637

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 400.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    class DesktopPlatform(Platform):
                      def __init__(self, args):
                        super(DesktopPlatform, self).__init__(args)
                        self.command_prefix = []
                    
                    
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 3 days to fix
                    current/deps/v8/tools/run_perf.py on lines 640..689

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 364.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    class TraceConfig(GraphConfig):
                      """Represents a leaf in the suite tree structure."""
                      def __init__(self, suite, parent, arch):
                        super(TraceConfig, self).__init__(suite, parent, arch)
                        assert self.results_regexp
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 2 days to fix
                    current/deps/v8/tools/run_perf.py on lines 393..439

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 248.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                      def ProcessOutput(self, output, result_tracker, count):
                        """Processes test run output and updates result tracker.
                    
                        Args:
                          output: Output object from the test run.
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 1 day to fix
                    current/deps/v8/tools/run_perf.py on lines 485..514

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 157.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    class DefaultSentinel(Node):
                      """Fake parent node with all default values."""
                      def __init__(self, binary = 'd8'):
                        super(DefaultSentinel, self).__init__()
                        self.binary = binary
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 1 day to fix
                    current/deps/v8/tools/run_perf.py on lines 308..327

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 140.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    def RunResultsProcessor(results_processor, output, count):
                      # Dummy pass through for null-runs.
                      if output.stdout is None:
                        return output
                    
                    
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 7 hrs to fix
                    current/deps/v8/tools/run_perf.py on lines 276..292

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 113.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    def MakeGraphConfig(suite, arch, parent):
                      """Factory method for making graph configuration objects."""
                      if isinstance(parent, RunnableConfig):
                        # Below a runnable can only be traces.
                        return TraceConfig(suite, parent, arch)
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 6 hrs to fix
                    current/deps/v8/tools/run_perf.py on lines 527..544

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 103.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    def BuildGraphConfigs(suite, arch, parent):
                      """Builds a tree structure of graph objects that corresponds to the suite
                      configuration.
                      """
                    
                    
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 4 hrs to fix
                    current/deps/v8/tools/run_perf.py on lines 547..560

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 76.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    def FlattenRunnables(node, node_cb):
                      """Generator that traverses the tree structure and iterates over all
                      runnables.
                      """
                      node_cb(node)
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 3 hrs to fix
                    current/deps/v8/tools/run_perf.py on lines 563..575

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 73.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                      def ChangeCWD(self, suite_path):
                        """Changes the cwd to to path defined in the current graph.
                    
                        The tests are supposed to be relative to the suite configuration.
                        """
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 3 hrs to fix
                    current/deps/v8/tools/run_perf.py on lines 453..460

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 72.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                      def GetCommandFlags(self, extra_flags=None):
                        suffix = ['--'] + self.test_flags if self.test_flags else []
                        return self.flags + (extra_flags or []) + [self.main] + suffix
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 3 hrs to fix
                    current/deps/v8/tools/run_perf.py on lines 462..464

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 64.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    class RunnableTraceConfig(TraceConfig, RunnableConfig):
                      """Represents a runnable suite definition that is a leaf."""
                      def __init__(self, suite, parent, arch):
                        super(RunnableTraceConfig, self).__init__(suite, parent, arch)
                    
                    
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 3 hrs to fix
                    current/deps/v8/tools/run_perf.py on lines 517..524

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 64.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    class Node(object):
                      """Represents a node in the suite tree structure."""
                      def __init__(self, *args):
                        self._children = []
                    
                    
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 2 hrs to fix
                    current/deps/v8/tools/run_perf.py on lines 295..305

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 51.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    def GeometricMean(values):
                      """Returns the geometric mean of a list of values.
                    
                      The mean is calculated using log to avoid overflow.
                      """
                    Severity: Major
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 1 hr to fix
                    current/deps/v8/tools/run_perf.py on lines 149..155

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 49.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                    def MainWrapper():
                      try:
                        return Main(sys.argv[1:])
                      except:
                        # Log uncaptured exceptions and report infra failure to the caller.
                    Severity: Minor
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 40 mins to fix
                    current/deps/v8/tools/run_perf.py on lines 1122..1128

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 34.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                        if self.binary != 'd8' and '--prof' in extra_flags:
                          logging.info('Profiler supported only on a benchmark run with d8')
                    Severity: Minor
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 30 mins to fix
                    current/deps/v8/tools/run_perf.py on lines 469..470

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 32.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                      def __init__(self, suite, parent, arch):
                        super(RunnableConfig, self).__init__(suite, parent, arch)
                        self.arch = arch
                    Severity: Minor
                    Found in lts/deps/v8/tools/run_perf.py and 1 other location - About 30 mins to fix
                    current/deps/v8/tools/run_perf.py on lines 445..447

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 32.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    There are no issues that match your filters.

                    Category
                    Status