Skip to content

Commit

Permalink
Telemetry exports T, allowing for T<cpu wallclock>
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Nov 1, 2017
1 parent cf1742d commit 91e00e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Telemetry.pm6
Expand Up @@ -261,6 +261,8 @@ class Telemetry {
multi method gist(Telemetry:D:) {
"$.cpu / $!wallclock"
}

multi method AT-KEY(Telemetry:D: $key) { self."$key"() }
}

# Telemetry::Period ------------------------------------------------------------
Expand Down Expand Up @@ -608,6 +610,10 @@ HEADER
nqp::join("\n",$text)
}

# The special T<foo bar> functionality -----------------------------------------

sub T () is export { Telemetry.new }

# Make sure we tell the world if we're implicitely told to do so ---------------
END { if @snaps { snap; note report(:legend) } }

Expand Down

0 comments on commit 91e00e6

Please sign in to comment.