Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Storage] [DataMovement] [Blobs] Update to Stress Metrics #46953

Merged
merged 7 commits into from
Nov 7, 2024
Merged
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
19 changes: 17 additions & 2 deletions sdk/storage/Azure.Storage.Common/src/stress/Shared/Metrics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,29 @@ public class Metrics
/// This is the metric name used to collect how many objects (e.g. local file, blob, share file) were transferred.
/// </summary>
///
public const string ObjectsTransferred = "ObjectsTransferred";
public const string ItemTransferCompleted = "ItemTransferCompleted";

/// <summary>
/// This is the metric name used to collect each transfer status that occurred.
/// </summary>
public const string TransferStatusChanged = "TransferStatusChanged";

/// <summary>
/// This is the metric name used to keep track of the failed transfer items.
/// </summary>
public const string TransferFailedItem = "TransferFailedItem";

/// <summary>
/// This is the metric name used to keep track of the skipped transfer items
/// </summary>
public const string ItemTransferSkipped = "ItemTransferSkipped";

/// <summary>
/// This is the metric name used to collect metrics on how many times
/// the individual transfer part was restarted or retried.
/// </summary>
///
public const string TransferRetriedRestarted = "TransferRestarted";
public const string TransferRestarted = "TransferRestarted";

/// <summary>
/// This is the metric name used to collect metrics on the total number of bytes that have been
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public abstract class TestScenarioBase
/// <summary>
/// Initializes a new Test instance.
/// </summary>
///\
///
/// <param name="metrics">The <see cref="Metrics" /> to use to send metrics to Application Insights.</param>
/// <param name="testRunId">Test Run Id to differ between test runs.</param>
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,92 +1,92 @@
scenarios:
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: uploadsingleblockblob
testScenario: uploadsingleblockblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
Scenario: uploaddirectoryblockblob
testScenario: uploaddirectoryblockblob
imageBuildDir: ../../../..
Scenario: uploaddirectoryblockBlob
testScenario: uploaddirectoryblockBlob
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: downloadsingleblockblob
testScenario: downloadsingleblockblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: downloaddirectoryblockblob
testScenario: downloaddirectoryblockblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: copysingleblockblob
testScenario: copysingleblockblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: copydirectoryblockblob
testScenario: copydirectoryblockblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: uploadsingleappendblob
testScenario: uploadsingleappendblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: uploaddirectoryappendblob
testScenario: uploaddirectoryappendblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: downloadsingleappendblob
testScenario: downloadsingleappendblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: downloaddirectoryappendblob
testScenario: downloaddirectoryappendblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: copysingleappendblob
testScenario: copysingleappendblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: copydirectoryappendblob
testScenario: copydirectoryappendblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: uploadsinglepageblob
testScenario: uploadsinglepageblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: uploaddirectorypageblob
testScenario: uploaddirectorypageblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: downloadsinglepageblob
testScenario: downloadsinglepageblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: downloaddirectorypageblob
testScenario: downloaddirectorypageblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: copysinglepageblob
testScenario: copysinglepageblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye
- image: Dockerfile
imageBuildDir: ../../../..
Scenario: copydirectorypageblob
testScenario: copydirectorypageblob
imageBuildDir: ../../../..
imageTag: stressstorage4okf44ko4zuos.azurecr.io/amnguye/net-stgdm-blobs/dockerfile:amnguye

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\..\Azure.Storage.DataMovement\src\Azure.Storage.DataMovement.csproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\..\Azure.Storage.Blobs\src\Azure.Storage.Blobs.csproj" />
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\..\Azure.Storage.Blobs\src\Azure.Storage.Blobs.csproj" >
<Aliases>BaseBlobs</Aliases>
</ProjectReference>
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\src\Azure.Storage.DataMovement.Blobs.csproj" />
</ItemGroup>
<ItemGroup>
Expand All @@ -37,6 +39,8 @@
<Compile Include="$(AzureStorageSharedSources)WindowStream.cs" LinkBase="Shared\Storage" />
</ItemGroup>
<ItemGroup>

<Compile Include="$(AzureStorageSharedTestSources)IDisposingContainer.cs" LinkBase="SharedSource\Storage" />
<Compile Include="$(AzureStorageSharedTestSources)TemporaryFileStream.cs" LinkBase="SharedSource\Storage" />
</ItemGroup>
<ItemGroup>
Expand All @@ -46,15 +50,18 @@
<Compile Include="$(AzureStorageDataMovementTestSharedSources)DisposingLocalDirectory.cs" LinkBase="Shared\DataMovement" />
<Compile Include="$(AzureStorageDataMovementTestSharedSources)TransferValidator.cs" LinkBase="Shared\DataMovement" />
<Compile Include="$(AzureStorageDataMovementTestSharedSources)TransferValidator.Local.cs" LinkBase="Shared\DataMovement" />
<Compile Include="$(AzureStorageDataMovementTestSharedSources)../TransferValidator.Blobs.cs" LinkBase="Shared\DataMovement" />
<Compile Include="$(MSBuildThisFileDirectory)..\..\..\Azure.Storage.DataMovement.Blobs\tests\DisposingBlobContainer.cs" LinkBase="Shared\DataMovement" />
<Compile Include="$(MSBuildThisFileDirectory)..\..\..\Azure.Storage.DataMovement.Blobs\tests\TransferValidator.Blobs.cs" LinkBase="Shared\DataMovement" />
<Compile Include="$(AzureStorageDataMovementTestSharedSources)TestEventsRaised.cs" LinkBase="Shared\DataMovement" />
</ItemGroup>
<ItemGroup>
<Compile Include="$(AzureStorageStressTestSharedSources)*.cs" LinkBase="Shared\Stress" />
<Compile Include="$(AzureStorageDataMovementTestSharedSources)..\..\stress\*.cs" LinkBase="Shared\Stress" />
</ItemGroup>
<ItemGroup>
<Content Include="Resources\**">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
extern alias BaseBlobs;

using Azure.Storage.Blobs;
using BaseBlobs::Azure.Storage.Blobs;

namespace Azure.Storage.DataMovement.Blobs.Stress
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

extern alias BaseBlobs;

using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Azure.Storage.Shared;
using Azure.Storage.Blobs;
using Azure.Storage.Blobs.Specialized;
using BaseBlobs::Azure.Storage.Blobs;
using BaseBlobs::Azure.Storage.Blobs.Specialized;
using NUnit.Framework;
using Azure.Storage.Blobs.Models;
using BaseBlobs::Azure.Storage.Blobs.Models;

namespace Azure.Storage.DataMovement.Blobs.Stress
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

extern alias BaseBlobs;

using System;
using Azure.Core;
using Azure.Storage.Stress;
using Azure.Storage.Blobs;
using BaseBlobs::Azure.Storage.Blobs;
using System.Threading.Tasks;
using System.IO;
using System.Threading;
using Azure.Storage.DataMovement.Stress;

namespace Azure.Storage.DataMovement.Blobs.Stress
{
public abstract class BlobScenarioBase : TestScenarioBase
public abstract class BlobScenarioBase : DataMovementScenarioBase
{
protected internal readonly Uri _destinationBlobUri;
protected internal int _blobSize;
protected internal readonly TokenCredential _tokenCredential;
protected internal BlobsStorageResourceProvider _blobsStorageResourceProvider;
protected internal LocalFilesStorageResourceProvider _localFilesStorageResourceProvider;
protected internal BlobServiceClient _blobServiceClient;
protected internal readonly TransferManagerOptions _transferManagerOptions;
protected internal readonly DataTransferOptions _dataTransferOptions;

public BlobScenarioBase(
Uri blobUri,
Expand All @@ -30,12 +31,10 @@ public BlobScenarioBase(
TokenCredential tokenCredential,
Metrics metrics,
string testRunId)
: base(metrics, testRunId)
: base(transferManagerOptions, dataTransferOptions, metrics, testRunId)
{
_destinationBlobUri = blobUri;
_blobSize = blobSize != default ? blobSize.Value : DataMovementBlobStressConstants.DefaultObjectSize;
_transferManagerOptions = transferManagerOptions;
_dataTransferOptions = dataTransferOptions;
_tokenCredential = tokenCredential;
_blobsStorageResourceProvider = new BlobsStorageResourceProvider(tokenCredential);
_localFilesStorageResourceProvider = new LocalFilesStorageResourceProvider();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
extern alias BaseBlobs;

using System;
using System.Threading;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Storage.Blobs.Models;
using BaseBlobs::Azure.Storage.Blobs.Models;
using Azure.Storage.Stress;

namespace Azure.Storage.DataMovement.Blobs.Stress
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

extern alias BaseBlobs;

using System;
using System.Threading;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Storage.Blobs.Models;
using BaseBlobs::Azure.Storage.Blobs.Models;
using Azure.Storage.Stress;

namespace Azure.Storage.DataMovement.Blobs.Stress
Expand Down
Loading