Skip to content

Commit

Permalink
Add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
johncmckim committed Mar 24, 2016
1 parent 93616e0 commit bd05b7b
Show file tree
Hide file tree
Showing 157 changed files with 74,276 additions and 5 deletions.
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,30 @@
Budgerigar is a Performance Budgetting tool for .NET.
It allows you to set performance targets and take action if those targets are not met.

For more info you can read the [blog post](https://medium.com/@johncmckim/performance-budgeting-net-8624604719dc).



## Getting Started with Budgerigar

**Getting Budgerigar**

Install from Nuget: `Install-Pacakge Budgerigar`

**Using Budgerigar**


var budgetter = new PerformanceBudgetter();
var response = await budgetter.RunWithBudgetAsync("some-task-name", 1.0M, async (b) => {
var response = await budgetter.RunWithBudgetAsync("some-task-name", 1.0M, async (budget) => {
// do work
var lotsOfData = await budget.StepAsync("get-data", async () => {
return await provider.GetLotsOfDataAsync();
});

await budget.StepAsync("proccess-data", async () => await processor.PorcessDataAsync(lotsOfData));
}, (result) => {
if(result.IsOver) {
logger.Error(result.GetDetailedOutput());
}
});


## Full Example

TODO (soon)
3 changes: 3 additions & 0 deletions examples/ASPNET-Core/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "wwwroot/lib"
}
23 changes: 23 additions & 0 deletions examples/ASPNET-Core/ASPNET-Core.xproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>54241bb8-75a3-40c7-a30f-bc441c454025</ProjectGuid>
<RootNamespace>ASPNET_Core</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<ItemGroup>
<DnxInvisibleContent Include="bower.json" />
<DnxInvisibleContent Include=".bowerrc" />
<DnxInvisibleContent Include="package.json" />
</ItemGroup>
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>
Loading

0 comments on commit bd05b7b

Please sign in to comment.