reader_concurrency_semaphore: add dump_diagnostics()

Allow semaphore related tests to include a diagnostics printout in error
messages to help determine why the test failed.
This commit is contained in:
Botond Dénes
2021-03-25 13:54:56 +02:00
parent caaa8ef59a
commit d246e2df0a
2 changed files with 8 additions and 0 deletions

View File

@@ -607,6 +607,12 @@ void reader_concurrency_semaphore::broken(std::exception_ptr ex) {
}
}
std::string reader_concurrency_semaphore::dump_diagnostics() const {
std::ostringstream os;
do_dump_reader_permit_diagnostics(os, *this, *_permit_list, "user request");
return os.str();
}
// A file that tracks the memory usage of buffers resulting from read
// operations.
class tracking_file_impl : public file_impl {

View File

@@ -310,4 +310,6 @@ public:
}
void broken(std::exception_ptr ex = {});
std::string dump_diagnostics() const;
};