ream88

ream88

Tracee - Trace function calls in concurrent Elixir processes

Hey, super proud to announce Tracee, a library that allows to trace and assert expected function calls within concurrent Elixir processes. I had a very particular problem that is explained in this forum post, and after like 6 rewrites tests are green and I’m happy with the API :blush:

Hex.pm: tracee | Hex
Source Code: GitHub - tagbase-io/tracee: Trace function calls in concurrent Elixir processes. · GitHub
Documentation: Tracee v0.2.0 — Documentation

See this example how do use it:

defmodule ModuleTest do
  use ExUnit.Case

  import Tracee

  setup :verify_on_exit!

  describe "fun/0" do
    test "calls expensive function only once" do
      expect(AnotherModule, :expensive_fun, 1)

      assert Module.fun()
    end

    test "calls expensive function only once from another process" do
      expect(AnotherModule, :expensive_fun, 1)

      assert fn -> Module.fun() end
             |> Task.async()
             |> Task.await()
    end
  end
end

Where Next?

Popular in Announcing Top

grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54092 488
New
mbuhot
Leverage Open Api 3.0 (Swagger) to document, test, validate and explore your Plug and Phoenix APIs. Generate and serve a JSON Open API ...
New
kip
ex_cldr provides localisation and internationalisation support based upon the data from the Unicode CLDR project. Unicode released CLDR ...
407 13300 120
New
RobertDober
Earmark is a pure-Elixir Markdown converter. It is intended to be used as a library (just call Earmark.as_html), but can also be used as...
239 12905 134
New
kevinlang
Hey all, We have made an Ecto3 Adapter for SQLite3, ecto_sqlite3! We have successfully on-boarded the full suite of integration tests (...
New
martinthenth
Hello everybody :wave: Recently, some of my colleagues talked about database ids and uuids and their problems, and I remembered the pain...
New
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...
384 14585 119
New

Other popular topics Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 49134 226
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement