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

Allow disabling the timing decorator

    XMLWordPrintable

    Details

    • Urgent?:
      No

      Description

      I managed to get something that worked for me on DM-34881, but it's just hack to completely disable the decorator. Tim Jenness 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

            Hide
            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.

            Show
            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.

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              Parejkoj John Parejko
              Watchers:
              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.