tfiedor/perun

View on GitHub

Showing 270 of 384 total issues

File commands.py has 969 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"""Commands is a core of the perun implementation containing the basic commands.

Commands contains implementation of the basic commands of perun pcs. It is meant
to be run both from GUI applications and from CLI, where each of the function is
possible to be run in isolation.
Severity: Major
Found in perun/logic/commands.py - About 2 days to fix

    File log.py has 767 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    """Set of helper function for logging and printing warnings or errors"""
    
    import builtins
    import collections
    import operator
    Severity: Major
    Found in perun/utils/log.py - About 1 day to fix

      File cli.py has 656 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      """Perun can be run from the command line (if correctly installed) using the
      command interface inspired by git.
      
      The Command Line Interface is implemented using the Click_ library, which
      allows both effective definition of new commands and finer parsing of the
      Severity: Major
      Found in perun/cli.py - About 1 day to fix

        File cli_helpers.py has 610 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        """Set of helper functions for working with command line.
        
        Contains functions for click api, for processing parameters from command line, validating keys,
        and returning default values.
        """
        Severity: Major
        Found in perun/utils/cli_helpers.py - About 1 day to fix

          File index.py has 527 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          """Collection of methods for manipulation with Index.
          
          This contains both helper constants, enums, and function, and most of all all definitions
          of various version of index entries.
          """
          Severity: Major
          Found in perun/logic/index.py - About 1 day to fix

            File stats.py has 476 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            """This module contains functions for manipulating statistics files (the so called 'stats')
            
            Stats are basically various data or statistics that need to be stored and manipulated by other
            modules, collectors, post-processors etc. The 'stats' file can be indirectly linked to a specific
            profile by using the profile 'source' or 'checksum' as a template for the name of the stats file.
            Severity: Minor
            Found in perun/logic/stats.py - About 7 hrs to fix

              File optimization.py has 471 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              """ The new Perun architecture extension that handles the optimization routine.
              """
              
              import collections
              
              
              Severity: Minor
              Found in perun/collect/trace/optimizations/optimization.py - About 7 hrs to fix

                File structs.py has 465 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                """ A module containing the necessary constants, enumerations, classes, etc., that have to be used
                by numerous other modules.
                """
                
                
                
                Severity: Minor
                Found in perun/collect/trace/optimizations/structs.py - About 7 hrs to fix

                  File factory.py has 465 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  """Collection of global methods for fuzz testing."""
                  
                  __author__ = 'Tomas Fiedor, Matus Liscinsky'
                  
                  import copy
                  Severity: Minor
                  Found in perun/fuzz/factory.py - About 7 hrs to fix

                    File engine.py has 462 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    """ The SystemTap engine implementation.
                    """
                    
                    import time
                    import os
                    Severity: Minor
                    Found in perun/collect/trace/systemtap/engine.py - About 7 hrs to fix

                      File runner.py has 462 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      """Collection of functions for running collectors and postprocessors"""
                      
                      import os
                      import subprocess
                      import signal
                      Severity: Minor
                      Found in perun/logic/runner.py - About 7 hrs to fix

                        File temp.py has 455 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        """This module contains functions for manipulating temporary files and directories located
                        in the .perun/tmp/ directory.
                        
                        The .perun/tmp/ directory can be used to store various temporary files used during data collection,
                        postprocessing, visualization, logging, command output capturing, etc.
                        Severity: Minor
                        Found in perun/logic/temp.py - About 6 hrs to fix

                          File run.py has 452 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          """
                          Postprocessor module with non-parametric analysis using the kernel regression methods.
                          """
                          
                          import click
                          Severity: Minor
                          Found in perun/postprocess/kernel_regression/run.py - About 6 hrs to fix

                            File parse_compact.py has 444 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            """ Module for parsing and transforming the raw performance records from trace collector
                            (systemtap engine) into a perun profile.
                            """
                            
                            import os
                            Severity: Minor
                            Found in perun/collect/trace/systemtap/parse_compact.py - About 6 hrs to fix

                              Function run_fuzzing_for_command has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
                              Open

                              def run_fuzzing_for_command(executable, input_sample, collector, postprocessor, minor_version_list,
                                                          **kwargs):
                                  """Runs fuzzing for a command w.r.t initial set of workloads
                              
                                  :param Executable executable: called command with arguments
                              Severity: Minor
                              Found in perun/fuzz/factory.py - About 6 hrs 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

                              File helpers.py has 425 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              """``perun.profile.factory`` specifies collective interface for basic
                              manipulation with profiles.
                              
                              The format of profiles is w.r.t. :ref:`profile-spec`. This module contains
                              helper functions for loading and storing of the profiles either in the
                              Severity: Minor
                              Found in perun/profile/helpers.py - About 6 hrs to fix

                                File __init__.py has 401 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                """Utils contains helper modules, that are not directly dependent on pcs.
                                
                                Utils contains various helper modules and functions, that can be used in arbitrary projects, and
                                are not specific for perun pcs, like e.g. helper decorators, logs, etc.
                                """
                                Severity: Minor
                                Found in perun/utils/__init__.py - About 5 hrs to fix

                                  File call_graph.py has 356 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  """ A module that implements the Call Graph Resource and all related operations needed for
                                  easy manipulation with its structure.
                                  
                                  The Call Graph Structure stores the extracted call graph as well as the control flow graph.
                                  """
                                  Severity: Minor
                                  Found in perun/collect/trace/optimizations/call_graph.py - About 4 hrs to fix

                                    File script_compact.py has 348 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    """SystemTap script generator module. Assembles the SystemTap script according to the specified
                                    rules such as function or USDT locations and sampling.
                                    """
                                    
                                    
                                    
                                    Severity: Minor
                                    Found in perun/collect/trace/systemtap/script_compact.py - About 4 hrs to fix

                                      File methods.py has 341 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      """
                                      Module implements methods of kernel regression postprocessor.
                                      
                                      This module contains the methods that implements the whole set of methods
                                      to execute the kernel regression. Also contains the auxiliary methods to
                                      Severity: Minor
                                      Found in perun/postprocess/kernel_regression/methods.py - About 4 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language