This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
j@janne:~$ ab -n 1000 -c 15 https://stockwebappnwusdwyqedabc.azurewebsites.net/Errors/Random | |
This is ApacheBench, Version 2.3 <$Revision: 1706008 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking stockwebappnwusdwyqedabc.azurewebsites.net (be patient) | |
Completed 100 requests | |
Completed 200 requests | |
Completed 300 requests | |
Completed 400 requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param ( | |
[Parameter(HelpMessage="Deployment target resource group")] | |
[string] $ResourceGroupName = "frontdoor-local-rg", | |
[Parameter(HelpMessage="Deployment target resource group location")] | |
[string] $Location = "North Europe", | |
[Parameter(HelpMessage="Front Door Name")] | |
[string] $FrontDoorName = "contosohqlocal", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .\deploy.ps1 | |
Not executing inside Azure DevOps Release Management. | |
Make sure you have done "Login-AzAccount" and | |
"Select-AzSubscription -SubscriptionName name" | |
so that script continues to work correctly for you. | |
WARNING: Resource group 'frontdoor-local-rg' doesn't exist and it will be created. | |
VERBOSE: Performing the operation "Replacing resource group ..." on target "frontdoor-local-rg". | |
VERBOSE: 2:32:06 PM - Created resource group 'frontdoor-local-rg' in location 'northeurope' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let canvas = <HTMLCanvasElement>document.getElementById("canvas"); | |
let context = canvas.getContext("2d"); | |
context.clearRect(0, 0, canvas.width, canvas.height); | |
const lineSpaceWidth = 50; | |
for (let i = 0; i <= this.canvas.width / lineSpaceWidth; i++) { | |
const line = i * lineSpaceWidth; | |
context.beginPath(); | |
context.moveTo(line, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using FeatureTogglerApp.Features; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Options; | |
namespace FeatureTogglerApp.Controllers | |
{ | |
[Route("api/[controller]")] | |
[ApiController] | |
public class DataController : ControllerBase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@page | |
@using Microsoft.Extensions.Options | |
@using FeatureTogglerApp.Features | |
@inject IOptionsSnapshot<FeatureOptions> featureOptions | |
@model IndexModel | |
@{ | |
ViewData["Title"] = "Home page"; | |
} | |
<div class="text-center"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
namespace FeatureTogglerApp.Features | |
{ | |
public class FeatureOptions : FeatureToggles | |
{ | |
public string AppName { get; set; } | |
public Dictionary<string, FeatureToggles> Users { get; set; } | |
public FeatureOptions() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
config.AddAzureAppConfiguration(options => | |
{ | |
// Use with connection string: | |
// options.Connect(connectionString) | |
// or with managed identity: | |
options.ConnectWithManagedIdentity(endpoint) | |
.Use("FeatureToggler:*") | |
.WatchAndReloadAll("FeatureToggler:UpdateKey", TimeSpan.FromSeconds(5)); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.Configure<FeatureOptions>(Configuration.GetSection("FeatureToggler")); | |
// ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using FeatureTogglerApp.Features; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.Extensions.Options; | |
namespace FeatureTogglerApp.Controllers | |
{ | |
[Route("api/[controller]")] | |
[ApiController] | |
public class DataController : ControllerBase |