Skip to content

Commit

Permalink
FIX : hierarchyHash : Add perf test ( it doesn't work well )
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldresser-ie committed Feb 8, 2025
1 parent 9b93053 commit 7fb3f9f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions python/GafferSceneTest/SceneAlgoTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2306,6 +2306,25 @@ def assertHashNotUnique():
GafferScene.SceneAlgo.hierarchyHash( group["out"], "/group/group" )
)

@GafferTest.TestRunner.PerformanceTestMethod()
def testHierarchyHashPerf( self ):

sphere = GafferScene.Sphere()

pathFilter = GafferScene.PathFilter()
pathFilter["paths"].setValue( IECore.StringVectorData( [ '/sphere' ] ) )

duplicate = GafferScene.Duplicate()
duplicate["in"].setInput( sphere["out"] )
duplicate["filter"].setInput( pathFilter["out"] )
duplicate["copies"].setValue( 500000 )


GafferSceneTest.traverseScene( duplicate["out"] )

with GafferTest.TestRunner.PerformanceScope() :
GafferScene.SceneAlgo.hierarchyHash( duplicate["out"], "/" )

def testRenderAdaptors( self ) :

sphere = GafferScene.Sphere()
Expand Down

0 comments on commit 7fb3f9f

Please sign in to comment.