Public Member Functions | |
Scheduler (AZStd::shared_ptr< StreamStackEntry > streamStack, u64 memoryAlignment=AZCORE_GLOBAL_NEW_ALIGNMENT, u64 sizeAlignment=1, u64 granularity=1_mib) | |
void | Start (const AZStd::thread_desc &threadDesc) |
void | Stop () |
FileRequestPtr | CreateRequest () |
void | CreateRequestBatch (AZStd::vector< FileRequestPtr > &requests, size_t count) |
void | QueueRequest (FileRequestPtr request) |
void | QueueRequestBatch (const AZStd::vector< FileRequestPtr > &requests) |
void | QueueRequestBatch (AZStd::vector< FileRequestPtr > &&requests) |
void | SuspendProcessing () |
void | ResumeProcessing () |
Resumes processing of requests on the Scheduler's main thread. | |
bool | IsSuspended () const |
Whether or not processing of requests has been suspended. | |
void | CollectStatistics (AZStd::vector< Statistic > &statistics) |
void | GetRecommendations (IStreamerTypes::Recommendations &recommendations) const |
void AZ::IO::Scheduler::CollectStatistics | ( | AZStd::vector< Statistic > & | statistics | ) |
Collects various metrics that are recorded by streamer and its stream stack. This function is deliberately not thread safe. All stats use a sliding window and never allocate memory. This might mean in some cases that values of individual stats may not be referencing the same window of requests, but in practice these differences are too minute to detect.
void AZ::IO::Scheduler::SuspendProcessing | ( | ) |
Stops the Scheduler's main thread from processing any requests. Requests can still be queued, but won't be picked up.