clinicjs / node-clinic-doctor-examples

Server examples for `clinic`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create an example of a callback called recursively

AlanSl opened this issue · comments

Based on a discussion with Mathias, we want to see how Bubbleprof handles common patterns where a callback is being called recursively, to see how we should best treat these in terms of sums, averages and quantiles.

So some application including something like (pseudocode)

fn a (n, callback)
  if (n > 0) setTimeout(a, n--, callback)
  else callback()