Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-34978

Allow disabling the timing decorator

    XMLWordPrintable

Details

    • No

    Description

      I managed to get something that worked for me on DM-34881, but it's just hack to completely disable the decorator. tjenness suggested on that ticket that we could have an environment variable one could set to disable the decorator. This ticket is to implement some way to temporarily disable the decorator, either via envvar, cmdline config option, or something else.

      Attachments

        Issue Links

          Activity

            No builds found.
            Parejkoj John Parejko created issue -
            Parejkoj John Parejko made changes -
            Field Original Value New Value
            Link This issue is triggered by DM-34881 [ DM-34881 ]
            tjenness Tim Jenness added a comment -

            The difficulty with something like setting lsst.utils.timer.disable = True is that that has to happen before the Task code has been imported. That can work if you know that your code will be imported much later but sometimes you can be surprised at the code paths that trigger early if someone left an import in the wrong place. pipetask does know that it won't import any Task code until it has parsed the command line parameters so that might be fine. The environment variable approach is guaranteed to be known before any code is imported.

            tjenness Tim Jenness added a comment - The difficulty with something like setting lsst.utils.timer.disable = True is that that has to happen before the Task code has been imported. That can work if you know that your code will be imported much later but sometimes you can be surprised at the code paths that trigger early if someone left an import in the wrong place. pipetask does know that it won't import any Task code until it has parsed the command line parameters so that might be fine. The environment variable approach is guaranteed to be known before any code is imported.
            sullivan Ian Sullivan made changes -
            Labels SciencePipelines SciencePipelines ap-analysis

            People

              Unassigned Unassigned
              Parejkoj John Parejko
              Eric Bellm, Ian Sullivan, John Parejko, Quentin Le Boulc'h, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Jenkins

                  No builds found.