Can C# Interactive show timing information?

231 views Asked by At

In F# Interactive, I can get timing information by using the #time directive:

> #time;;

--> Timing now on

> [1..1000_000] |> List.rev |> List.head;;
Real: 00:00:00.159, CPU: 00:00:00.156, GC gen0: 6, gen1: 3, gen2: 0
val it : int = 1000000

Likewise, in GHCi, I can get the same information with :set +s:

Prelude> :set +s
Prelude> head $ reverse [1..1000000]
1000000
(0.20 secs, 96,304,704 bytes)

Notice that in both examples, the REPL reports the time it took to evaluate the expression.

Is a similar option available for C# Interactive, and if so, how do I enable it?

0

There are 0 answers