Skip to content

Commit

Permalink
Added perf loggers for vertex + edge filters
Browse files Browse the repository at this point in the history
  • Loading branch information
suraj5077 committed Dec 4, 2024
1 parent f2b516f commit f04603b
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1328,11 +1328,21 @@ private boolean vertexMatchesEvaluation(AtlasVertex currentVertex, AtlasLineageC
}

private boolean vertexMatchesEvaluation(AtlasVertex currentVertex, AtlasLineageOnDemandContext atlasLineageOnDemandContext) {
return atlasLineageOnDemandContext.evaluate(currentVertex);
AtlasPerfMetrics.MetricRecorder metric = RequestContext.get().startMetricRecord("vertexMatchesEvaluation");
try {
return atlasLineageOnDemandContext.evaluate(currentVertex);
} finally {
RequestContext.get().endMetricRecord(metric);
}
}

private boolean edgeMatchesEvaluation(AtlasEdge currentEdge, AtlasLineageOnDemandContext atlasLineageOnDemandContext) {
return atlasLineageOnDemandContext.evaluate(currentEdge);
AtlasPerfMetrics.MetricRecorder metric = RequestContext.get().startMetricRecord("edgeMatchesEvaluation");
try {
return atlasLineageOnDemandContext.evaluate(currentEdge);
} finally {
RequestContext.get().endMetricRecord(metric);
}
}

private boolean shouldProcessEdge(AtlasLineageContext lineageContext, AtlasEdge edge) {
Expand Down

0 comments on commit f04603b

Please sign in to comment.