Coder Social home page Coder Social logo

extrace's Introduction

Extrace

Hex.pm Version

Extrace is an Elixir wrapper for Recon Trace.

Example

1, set point

iex(1)> Extrace.calls([{Enum, :take_random, fn _ -> :return end}, {Enum, :count, fn _ -> :return end}], 100, [scope: :local])
4

Note that the functions to be traced (:take_random and :count in the example above) can only be private if scope: :local is set.

2, one function executed

iex(2)> Enum.take_random([1,2,3,4], 200)
[2, 4, 3, 1]

18:42:10.834670 <0.183.0> Enum.take_random([1, 2, 3, 4], 200)

18:42:10.840212 <0.183.0> Enum.take_random(%{0 => 2, 1 => 4, 2 => 3, 3 => 1}, 4, [])

18:42:10.840949 <0.183.0> Enum.take_random(%{0 => 2, 1 => 4, 2 => 3, 3 => 1}, 3, [1])

18:42:10.841064 <0.183.0> Enum.take_random(%{0 => 2, 1 => 4, 2 => 3, 3 => 1}, 2, [3, 1])

18:42:10.841202 <0.183.0> Enum.take_random(%{0 => 2, 1 => 4, 2 => 3, 3 => 1}, 1, [4, 3, 1])

18:42:10.841330 <0.183.0> Enum.take_random(%{0 => 2, 1 => 4, 2 => 3, 3 => 1}, 0, [2, 4, 3, 1])

18:42:10.841440 <0.183.0> Enum.take_random/3 --> [2, 4, 3, 1]

18:42:10.841521 <0.183.0> Enum.take_random/3 --> [2, 4, 3, 1]

18:42:10.841606 <0.183.0> Enum.take_random/3 --> [2, 4, 3, 1]

18:42:10.841685 <0.183.0> Enum.take_random/3 --> [2, 4, 3, 1]

18:42:10.841959 <0.183.0> Enum.take_random/3 --> [2, 4, 3, 1]

18:42:10.842046 <0.183.0> Enum.take_random/2 --> [2, 4, 3, 1]

3, another function executed

iex(4)> Enum.count([1,2,3,4])
4

18:42:27.383667 <0.183.0> Enum.count([1, 2, 3, 4])

18:42:27.383795 <0.183.0> Enum.count/1 --> 4

Other

Original library repository

extrace's People

Contributors

redink avatar dependabot-preview[bot] avatar dependabot-support avatar kbaird avatar feng19 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.