- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.1k
Refactoring ZeroToOneTargetScaler #53263
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Refactors blob trigger scaling infrastructure by migrating from ScaleMonitor to TargetScaler and introducing optimizations for zero-to-one scaling decisions based on recent blob writes.
- Replaces IScaleMonitorProvider with ITargetScalerProvider and introduces BlobTargetScalerProvider with caching of recent write detection.
- Adds targeted method GetFirstWriteForContainerAsync to efficiently locate the first relevant write entry and factors parsing logic into a reusable ParseLine method.
- Adds new tests validating caching behavior and recent write detection logic.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description | 
|---|---|
| StorageBlobsWebJobsBuilderExtensions.cs | Swaps service registration from IScaleMonitorProvider to ITargetScalerProvider to enable new scaling approach. | 
| BlobTargetScalerProvider.cs | Introduces TargetScaler implementation with cached recent write logic. | 
| BlobLogListener.cs | Adds efficient container-scoped write detection and line-level parsing integration. | 
| StorageAnalyticsLogParser.cs | Refactors inline parsing logic into reusable ParseLine method. | 
| ZeroToOneTargetScalerTests.cs | Adds unit tests validating scaling behavior and cache hit logging. | 
| BlobScalerMonitorProvider.cs | Removes deprecated ScaleMonitor-based implementation. | 
Comments suppressed due to low confidence (1)
sdk/storage/Microsoft.Azure.WebJobs.Extensions.Storage.Blobs/src/Listeners/BlobTargetScalerProvider.cs:1
- These using directives appear unused; removing them will reduce clutter.
// Copyright (c) Microsoft Corporation. All rights reserved.
All of these optimizations are designed to enhance performance during blob trigger scaling from 0 to 1 and to address potential high memory usage issues.