def METHOD_NAME(benchmark, n, log):
    x = make_data(size=n)
    cost = UnbinnedNLL(x, log_mixture if log else mixture, log=log)
    m = Minuit(cost, *ARGS)
    m.limits[0, 1] = (0, 1)
    m.limits[2, 3] = (0, 10)
    def run():
        m.reset()
        return m.migrad()
    m = benchmark(run)
    assert m.valid
    # ignore slope
    assert_allclose(m.values[:-1], ARGS[:-1], atol=2 / n**0.5)