Skip to content

Commit 61d4779

Browse files
committed
format changes from website editor
1 parent 3232a33 commit 61d4779

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/mix/test/mix/tasks/profile.tprof_test.exs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,20 @@ defmodule Mix.Tasks.Profile.TprofTest do
8383

8484
test "sorts based on memory per call", context do
8585
in_tmp(context.test, fn ->
86-
result = capture_io(fn ->
87-
Tprof.run(["--type", "memory", "--sort", "per_call", "-e", @expr])
88-
end)
89-
86+
result =
87+
capture_io(fn ->
88+
Tprof.run(["--type", "memory", "--sort", "per_call", "-e", @expr])
89+
end)
90+
9091
[_warmup, _profile_results, _columns, _total, first, second, _profile_done, ""] =
9192
String.split(result, ~r/\n+/)
92-
93+
9394
list =
9495
Enum.map([first, second], fn row ->
9596
[mfa, _calls, _percent, _words, per_call] = String.split(row, ~r/\s+/)
9697
{mfa, String.to_float(per_call)}
9798
end)
98-
99+
99100
assert list == Enum.sort_by(list, &elem(&1, 1))
100101
assert List.keymember?(list, "Enum.each/2", 0)
101102
assert List.keymember?(list, ":erlang.integer_to_binary/1", 0)

0 commit comments

Comments
 (0)