Lines Matching +full:tx +full:- +full:slots

76 /// Map of in-flight PIDs to their corresponding test case IDs.
86 /// This function is idempotent: we maintain a side cache of already-put test
93 /// \param [in,out] tx Writable transaction on the store.
94 /// \param [in,out] ids_cache Cache of already-put test programs.
99 store::write_transaction& tx, in find_test_program_id() argument
102 const fs::path& key = test_program->relative_path(); in find_test_program_id()
105 const int64_t id = tx.put_test_program(*test_program); in find_test_program_id()
118 /// \param [in,out] tx Writable transaction where to store the result data.
122 store::write_transaction& tx) in put_test_result() argument
124 tx.put_result(result.test_result(), test_case_id, in put_test_result()
126 tx.put_test_case_file("__STDOUT__", result.stdout_file(), test_case_id); in put_test_result()
127 tx.put_test_case_file("__STDERR__", result.stderr_file(), test_case_id); in put_test_result()
157 /// \param [in,out] tx Writable transaction to obtain test IDs.
158 /// \param [in,out] ids_cache Cache of already-put test cases.
159 /// \param user_config The end-user configuration properties.
167 store::write_transaction& tx, in start_test() argument
178 test_program, tx, ids_cache); in start_test()
179 const int64_t test_case_id = tx.put_test_case( in start_test()
192 /// \param [in,out] tx Writable transaction to put the test results.
199 store::write_transaction& tx, in finish_test() argument
206 put_test_result(test_case_id, *test_result_handle, tx); in finish_test()
210 *test_result_handle->test_program(), in finish_test()
211 test_result_handle->test_case_name(), in finish_test()
212 test_result_handle->test_result(), in finish_test()
213 result_handle->end_time() - result_handle->start_time()); in finish_test()
221 /// \return A user-facing string with the collection of PIDs.
228 pids.insert(iter->first); in format_pids()
249 /// \param user_config The end-user configuration properties.
266 store::write_transaction tx = db.start_write(); in drive() local
270 (void)tx.put_context(context); in drive()
279 const std::size_t slots = user_config.lookup< config::positive_int_node >( in drive() local
281 INV(slots >= 1); in drive()
283 INV(in_flight.size() <= slots); in drive()
285 // Spawn as many jobs as needed to fill our execution slots. We do this in drive()
288 while (in_flight.size() < slots) { in drive()
295 const model::test_case& test_case = test_program->find( in drive()
304 handle, match.get(), tx, ids_cache, user_config, hooks); in drive()
306 F("Spawned test has PID of still-tracked process %s") % in drive()
311 // If there are any used slots, consume any at random and return the in drive()
312 // result. We consume slots one at a time to give preference to the in drive()
318 result_handle->original_pid()); in drive()
320 F("Lost track of in-flight PID %s; tracking %s") % in drive()
321 result_handle->original_pid() % format_pids(in_flight)); in drive()
325 finish_test(result_handle, test_case_id, tx, hooks); in drive()
334 handle, *iter, tx, ids_cache, user_config, hooks); in drive()
336 finish_test(result_handle, data.second, tx, hooks); in drive()
339 tx.commit(); in drive()