use Attribute::Benchmark; sub name1 :Benchmark { ... } sub name2 :Benchmark { ... }