<s> import time <EOL> import pytest <EOL> class Foo ( object ) : <EOL> def __init__ ( self , arg = <NUM_LIT> ) : <EOL> self . arg = arg <EOL> def run ( self ) : <EOL> self . internal ( self . arg ) <EOL> def internal ( self , duration ) : <EOL> time . sleep ( duration ) <EOL> @ pytest . mark . benchmark ( max_time = <NUM_LIT> ) <EOL> def test_weave_fixture ( benchmark_weave ) : <EOL> benchmark_weave ( Foo . internal , lazy = True ) <EOL> f = Foo ( ) <EOL> f . run ( ) <EOL> @ pytest . mark . benchmark ( max_time = <NUM_LIT> ) <EOL> def test_weave_method ( benchmark ) : <EOL> benchmark . weave ( Foo . internal , lazy = True ) <EOL> f = Foo ( ) <EOL> f . run ( ) </s>
