* @brief Batch Mode * * Run a subset of samples. The next sample in the set will start after the current sample being executed has finished. Using --wrap-to-start will start again from the first sample after the last sample is executed. * * Usage: vulkan_samples batch --duration 3 --category performance --tag arm * */
| 40 | * |
| 41 | */ |
| 42 | class BatchMode : public BatchModeTags |
| 43 | { |
| 44 | public: |
| 45 | BatchMode(); |
| 46 | |
| 47 | virtual ~BatchMode() = default; |
| 48 | |
| 49 | void on_update(float delta_time) override; |
| 50 | void on_app_error(const std::string &app_id) override; |
| 51 | |
| 52 | bool handle_command(std::deque<std::string> &arguments) const override; |
| 53 | bool handle_option(std::deque<std::string> &arguments) override; |
| 54 | void trigger_command() override; |
| 55 | |
| 56 | private: |
| 57 | void request_app(); |
| 58 | void load_next_app(); |
| 59 | |
| 60 | private: |
| 61 | std::vector<std::string> categories; |
| 62 | std::chrono::duration<float, vkb::Timer::Seconds> duration = 3s; |
| 63 | float elapsed_time = 0.0f; |
| 64 | std::set<std::string> skips; |
| 65 | std::vector<apps::AppInfo *>::const_iterator sample_iter; // An iterator to the current batch mode sample info object |
| 66 | std::vector<apps::AppInfo *> sample_list; // The list of suitable samples to be run in conjunction with batch mode |
| 67 | std::vector<std::string> tags; |
| 68 | bool wrap_to_start = false; |
| 69 | }; |
| 70 | } // namespace plugins |
nothing calls this directly
no outgoing calls
no test coverage detected