Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3478 from Aircloak/sasa/fix-crash-in-memory-logger
Browse files Browse the repository at this point in the history
fix the crash in memory logger
  • Loading branch information
sasa1977 authored Jan 21, 2019
2 parents 5a41609 + 90efcd7 commit a544b8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloak/lib/cloak/memory_usage.ex
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ defmodule Cloak.MemoryUsage do
stacktrace = Cloak.LoggerTranslator.filtered_stacktrace(stacktrace)

[
"memory usage: process #{name} uses #{bytes_to_mb(process.memory)} MB",
"memory usage: process #{inspect(name)} uses #{bytes_to_mb(process.memory)} MB",
"initial_call: #{inspect(process.initial_call)}",
"stacktrace: #{inspect(stacktrace)}"
]
Expand All @@ -65,7 +65,7 @@ defmodule Cloak.MemoryUsage do
|> Stream.map(&Map.new/1)
|> Stream.filter(&(words_to_mb(&1.memory) >= @large_mem_usage_in_mb))
|> Enum.sort_by(& &1.memory, &>=/2)
|> Enum.each(&Logger.info("memory usage: ETS table #{&1.name} uses #{words_to_mb(&1.memory)} MB"))
|> Enum.each(&Logger.info("memory usage: ETS table #{inspect(&1.name)} uses #{words_to_mb(&1.memory)} MB"))
end

# -------------------------------------------------------------------
Expand Down

0 comments on commit a544b8b

Please sign in to comment.