logo

Crowdly

Browser

Add to Chrome

public class TimingDecorator : IJob { private readonly IJob _inner; pri...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

public class TimingDecorator : IJob

{

private readonly IJob _inner;

private readonly IMetrics _m;

public TimingDecorator(IJob j, IMetrics m) => (_inner, _m) = (j, m);

public void Run()

{

var sw = Stopwatch.StartNew();

_inner.Run();

_m.Record("job_ms", sw.ElapsedMilliseconds);

}

}

Що додає TimingDecorator?

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on do.ipo.kpi.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome