mayel

mayel

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
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 11030 135
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
woylie
Phoenix components for pagination, sortable tables and filter forms with Flop and (optionally) Ecto. pagination cursor pagination sorta...
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

Other Trending Topics Top

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
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
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