Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@timed macro reports 1 microsecond #100

Closed
kzemek opened this issue Nov 15, 2017 · 0 comments
Closed

@timed macro reports 1 microsecond #100

kzemek opened this issue Nov 15, 2017 · 0 comments

Comments

@kzemek
Copy link

kzemek commented Nov 15, 2017

The following code using @timed reports 1 microsecond time. The timed/1 macro seems to work correctly.

defmodule Repro do
  use Elixometer

  def hello do
    :dbg.tracer()
    :dbg.p(:all, :c)
    :dbg.tpl(Elixometer.Updater, :timer, :x)
    Repro.time_me()
  end

  @timed(key: "timedkey")
  def time_me do
    :timer.sleep(1500)
  end
end
iex(1)> Repro.hello
(<0.245.0>) call 'Elixir.Elixometer.Updater':timer(<<"timedkey">>,microsecond,1)
(<0.245.0>) returned from 'Elixir.Elixometer.Updater':timer/3 -> ok
:ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant