mayel

mayel OP

Untangle provides alternatives for IO.inspect and the macros in Elixir’s Logger to output code location information. It also provides a polyfill for calls to dbg which was introduced in Elixir 1.14 (it won’t give you the IEx integration but will show an ouput in console, which is handy if you want to start using dbg in codebases where not everyone is on the latest Elixir).

Code: GitHub - bonfire-networks/untangle: Logging and inspecting with location information · GitHub
Hex: untangle | Hex
Read me: Untangle — untangle v0.4.0
Module Docs: Untangle — untangle v0.4.0

First 3 of 3 Posts Switch mode

mayel

mayel OP

New addition is the ability to log the execution time of functions.

You decorate a function like this:

use Untangle

@decorate time()
def foo(), do: :stuff

and will log something like [info] Time to run MyModule.foo/0: 1 ms

dimitarvp

dimitarvp

Would you consider making the timing granularity in microseconds?

mayel

mayel OP

Ah yes, timing is done in micoseconds but converted to milliseconds in the log message. I’d welcome a PR to only use milliseconds if higher than 1 ms.

— All posts loaded —

Where Next? Top

Trending in Announcing Top

bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
387 15136 120
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
shahryarjb
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly. One of i...
New
kip
Please say hi to a new lib, Astro that aims to deliver easy-to-consume astronomy calculations of practical use. For now it only calculat...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New

Other Trending Topics Top

juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New

We're in Beta

About us Mission Statement