【发布时间】:2017-03-01 03:35:30
【问题描述】:
我正在测试基准库来衡量代码的性能。我正在阅读文档。
我不知道如何打印出基准测试结果。 我有一个名为 user 的类,我想使用以下方法。
[Benchmark]
public bool FollowerAdded(User newFollower)
{
// code for notifying user that they have an added follower
Notification notification = new Notification();
return notification.NotifyUser(this, newFollower.UserName + " is now following you!");
}
在 benchmarkdot net 的文档中,使用以下代码来打印输出 bechmarks。
var summary = BenchmarkRunner.Run<User>();
在 Asp.net MVC 应用程序获取基准测试结果的情况下,我们可以将这段代码放在哪里获取结果?
【问题讨论】:
标签: c# asp.net-mvc benchmarkdotnet