Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -808,14 +808,16 @@
"inherits": [
"linux-basic-g++",
"debug-build"

]
},
{
"name": "linux-g++-debug-tests",
"inherits": [
"linux-basic-g++",
"debug-build",
"enable-tests"
"enable-tests",
"enable-perf"
],
"displayName": "Linux g++, Debug+Tests"
},
Expand Down
7 changes: 7 additions & 0 deletions sdk/core/perf/src/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,13 @@ inline void RunTests(
std::cout << std::endl << "=== Results ===";

auto totalOperations = Sum(completedOperations);
for (auto completionTime : lastCompletionTimes) {
if (completionTime > deadLineSeconds + std::chrono::milliseconds(500)) {
std::cout << "Warning: One of the tests ran for " << static_cast<double>(std::chrono::duration_cast<std::chrono::milliseconds>(completionTime).count()) / 1000 << "s, longer than the specified duration of "
<< durationInSeconds << " seconds." << std::endl;
}

}
auto operationsPerSecond = Sum(ZipAvg(completedOperations, lastCompletionTimes));
auto secondsPerOperation = 1 / operationsPerSecond;
auto weightedAverageSeconds = totalOperations / operationsPerSecond;
Expand Down
28 changes: 27 additions & 1 deletion sdk/storage/azure-storage-blobs/perf-resources.bicep
Original file line number Diff line number Diff line change
@@ -1,13 +1,39 @@
param baseName string = resourceGroup().name
param testApplicationOid string
param location string = resourceGroup().location

resource storageAccount 'Microsoft.Storage/storageAccounts@2019-06-01' = {

var blobDataContributorRoleId = 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'
var blobDataOwnerRoleId = 'b7e6dc6d-f1e8-4753-8033-0f276bb0955b'

resource blobDataContributor 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(blobDataContributorRoleId, resourceGroup().id)
properties: {
roleDefinitionId: resourceId('Microsoft.Authorization/roleDefinitions', blobDataContributorRoleId)
principalId: testApplicationOid
}
}

resource blobDataOwner 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(blobDataOwnerRoleId, resourceGroup().id)
properties: {
roleDefinitionId: resourceId('Microsoft.Authorization/roleDefinitions', blobDataOwnerRoleId)
principalId: testApplicationOid
}
}

resource storageAccount 'Microsoft.Storage/storageAccounts@2024-01-01' = {
name: '${baseName}blob'
location: location
kind: 'BlockBlobStorage'
sku: {
name: 'Premium_LRS'
}
properties: {
publicNetworkAccess: null
supportsHttpsTrafficOnly: true

}
}

var name = storageAccount.name
Expand Down
Loading