USE AdventureWorks2008R2;
GO
IF OBJECT_ID('ExecuteLotsOfStatements') IS NOT NULL
BEGIN
	DROP PROCEDURE dbo.ExecuteLotsOfStatements
END
GO
CREATE PROCEDURE dbo.ExecuteLotsOfStatements
(@ExecutionLoopCount INT = 1000)
AS

DECLARE @Loop INT = 0;
WHILE @Loop < @ExecutionLoopCount
BEGIN
	DECLARE @Loop2 INT
	SELECT @Loop2 = @Loop
	
	SET @Loop = @Loop+1
END

GO

EXECUTE dbo.ExecuteLotsOfStatements @ExecutionLoopCount = 100000

SET STATISTICS TIME OFF

EXECUTE dbo.ExecuteLotsOfStatements @ExecutionLoopCount = 100000

-- No Trace at all
 SQL Server Execution Times:
   CPU time = 4969 ms,  elapsed time = 8987 ms.

-- Server Side Trace
 SQL Server Execution Times:
   CPU time = 7703 ms,  elapsed time = 13077 ms.

-- Profiler Trace
 SQL Server Execution Times:
   CPU time = 8297 ms,  elapsed time = 38571 ms.

-- XE Session
 SQL Server Execution Times:
   CPU time = 6281 ms,  elapsed time = 11408 ms.