ashmind / SharpLab

.NET language playground
https://sharplab.io
BSD 2-Clause "Simplified" License
2.71k stars 198 forks source link

Quick benchmark mode #193

Open jnm2 opened 7 years ago

jnm2 commented 7 years ago

I see things like this and wish I could see the error, min/max, etc. You've got a run mode, but what would be really cool is a dedicated benchmark mode which invokes BenchmarkDotNet on a class and formats the results.

The template could be set up to copy and paste into benchmark methods. Maybe even adding a new empty method each time you enter code into the previous method and leaving it out of the benchmark. I'd imagine run-as-you-type could be undesirable, so a run button could be added.

Just throwing this out there. I can imagine, depending who's footing the Azure bill, that this might be totally unrealistic. 😁 But then, I still find the whole site unbelievably stunning so I figured it couldn't hurt to ask.

ashmind commented 7 years ago

@jnm2 Thanks for the compliment! This idea is something I had a few times as well, with pretty much the same concerns -- Azure costs. It would also be pretty hard to protect from misuse (Bitcoin mining?).

One weird idea (not sure if anyone ever done this) might be to allow user to somehow login with their Azure identity and grant SharpLab permission to install a personal endpoint into their Azure subscription. This would pass the cost directly to the users.

I'll think about it a bit more -- unlikely I would be able to do anything in the nearest future, but it's an interesting problem.

ghost commented 6 years ago

@ashmind, you might be interested in https://docs.microsoft.com/en-us/azure/managed-applications/overview