Skip to content

Commit

Permalink
Add runtime metrics for FilterDiaSourceCatalogTask
Browse files Browse the repository at this point in the history
  • Loading branch information
rai-harshit committed Feb 2, 2024
1 parent 4dcd5b5 commit 205f5ad
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
16 changes: 15 additions & 1 deletion pipelines/_ingredients/MetricsRuntime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,13 @@ tasks:
connections.metric: PackageAlertsTime
connections.labelName: diaPipe
target: diaPipe:alertPackager.run
timing_filterDiaSrcCat:
class: lsst.verify.tasks.commonMetrics.TimingMetricTask
config:
connections.package: ap_association
connections.metric: FilterDiaSourceCatalogTime
connections.labelName: filterDiaSrcCat
target: filterDiaSrcCat.run
cputiming_isr:
class: lsst.verify.tasks.commonMetrics.CpuTimingMetricTask
config:
Expand Down Expand Up @@ -233,6 +240,13 @@ tasks:
connections.metric: PackageAlertsCpuTime
connections.labelName: diaPipe
target: diaPipe:alertPackager.run
cputiming_filterDiaSrcCat:
class: lsst.verify.tasks.commonMetrics.TimingMetricTask
config:
connections.package: ap_association
connections.metric: FilterDiaSourceCatalogCpuTime
connections.labelName: filterDiaSrcCat
target: filterDiaSrcCat.run
memory_apPipe:
class: lsst.verify.tasks.commonMetrics.MemoryMetricTask
config:
Expand All @@ -253,4 +267,4 @@ tasks:
connections.package: ap_association
connections.metric: PackageAlertsMemory
connections.labelName: diaPipe
target: diaPipe:alertPackager.run
target: diaPipe:alertPackager.run
24 changes: 24 additions & 0 deletions python/lsst/ap/verify/testPipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,30 @@ def run(self, science, matchedTemplate, difference,
)


class MockFilterDiaSourceCatalogTask(PipelineTask):
"""A do-nothing substitute for FilterDiaSourceCatalogTask.
"""
ConfigClass = FilterDiaSourceCatalogConfig

Check failure on line 439 in python/lsst/ap/verify/testPipeline.py

View workflow job for this annotation

GitHub Actions / call-workflow / lint

F821

undefined name 'FilterDiaSourceCatalogConfig'
_DefaultName = "notFilterDiaSourceCatalog"

def run(self, diaSourceCat):
"""Produce filtering outputs with no processing.
Parameters
----------
diaSourceCat : `lsst.afw.table.SourceCatalog`
Catalog of sources measured on the difference image.
Returns
-------
results : `lsst.pipe.base.Struct`
Results struct with components.
"""
return pipeBase.Struct(filteredDiaSourceCat=afwTable.SourceCatalog(),

Check failure on line 455 in python/lsst/ap/verify/testPipeline.py

View workflow job for this annotation

GitHub Actions / call-workflow / lint

F821

undefined name 'pipeBase'
rejectedDiaSources=afwTable.SourceCatalog(),
)


class MockTransformDiaSourceCatalogTask(PipelineTask):
"""A do-nothing substitute for TransformDiaSourceCatalogTask.
"""
Expand Down

0 comments on commit 205f5ad

Please sign in to comment.