I hereby claim:
- I am ma2gedev on github.
- I am ma2ge (https://keybase.io/ma2ge) on keybase.
- I have a public key ASAsFfLCgqIXqkyp3oeC82M_-dpoahsJzzsEzFchM55MMAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
query {
viewer {
login
}
}
query {
https://github.com/ma2gedev/power_assert_ex/commit/f0d9155af9089d32b27636707c79fdf17d894aea
defmodule PowerAssertWrapper do | |
defmacro passert(ast, message \\ nil) do | |
quote do | |
PowerAssert.Assertion.assert(unquote(ast), unquote(message)) | |
end | |
end | |
end | |
defmodule ExSpecSampleTest do | |
use ExSpec, async: true |
iex(1)> import PowerAssert.Debug | |
nil | |
iex(2)> x = [1,2,3,4] | |
[1, 2, 3, 4] | |
iex(3)> y = 2 | |
2 | |
iex(4)> puts_expr(x |> Enum.at(y)) | |
x |> Enum.at(y) | |
| | | | |
| 3 2 |
追記: @sonots さんに AMI 作って検証をしていただいた結果は以下にあります。 https://gist.github.com/sonots/62179703d429d36b1a57
全部ローカルの MacBook Air で計測
やったことは
https://github.com/alco/benchfella
# Luhn version 0.1.0
$ mix bench
# cronolog installed in /usr/sbin/ | |
# in config/environments/{development,production}.rb | |
config.logger = Logger.new(IO.popen("/usr/sbin/cronolog #{config.paths['log'].first}.%Y%m%d", "w")) |
require 'benchmark'
date = Date.new(2015, 2, 11)