Skip to content

Commit

Permalink
Add getQueueLength to BatchProcessor
Browse files Browse the repository at this point in the history
Summary:
Expose the private BatchProcessor's current queue length for diagnostic purposes.

Changelog: Internal

Reviewed By: hoxyq

Differential Revision: D60048000

fbshipit-source-id: 1922eb6b7c56e64c04283ba8affb7d030f15a1d9
  • Loading branch information
robhogan authored and facebook-github-bot committed Jul 23, 2024
1 parent b04b63c commit 72045a5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/metro/src/lib/BatchProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ class BatchProcessor<TItem, TResult> {
},
);
}

getQueueLength(): number {
return this._queue.length;
}
}

module.exports = BatchProcessor;

0 comments on commit 72045a5

Please sign in to comment.