def all(iterable = None, *, name = None, metric = call_default):
    """Measure total time and item count for consuming an iterable

    :arg iterable: any iterable
    :arg function metric: f(name, count, total_time)
    :arg str name: name for the metric
    """
    if iterable is None:
        return _iter_decorator(name, metric)
    else:
        return _do_all(iterable, name, metric)