Commit 1bea6f2f authored by Lee Howes's avatar Lee Howes Committed by Facebook Github Bot

Add logging for calls to Future::via

Summary: Adds sampled logging to track executors passed to Future::via.

Reviewed By: andriigrynenko

Differential Revision: D18233242

fbshipit-source-id: b5c004f643261a36fd0b63fb6e033263ece1662f
parent f6ac9ac1
main v2022.02.14.00 v2022.02.07.00 v2022.01.31.00 v2022.01.24.00 v2022.01.17.00 v2022.01.10.00 v2022.01.03.00 v2021.12.27.00 v2021.12.20.00 v2021.12.13.00 v2021.12.06.00 v2021.11.29.00 v2021.11.15.00 v2021.11.08.00 v2021.11.01.00 v2021.10.25.00 v2021.10.18.00 v2021.10.11.00 v2021.10.04.00 v2021.09.27.00 v2021.09.20.00 v2021.09.13.00 v2021.09.06.00 v2021.08.30.00 v2021.08.23.00 v2021.08.02.00 v2021.07.22.00 v2021.07.20.01 v2021.07.20.00 v2021.06.28.00 v2021.06.14.00 v2021.06.07.00 v2021.05.31.00 v2021.05.24.00 v2021.05.17.00 v2021.05.10.00 v2021.05.03.00 v2021.04.26.00 v2021.04.19.00 v2021.04.12.00 v2021.04.05.00 v2021.03.29.00 v2021.03.22.00 v2021.03.15.00 v2021.03.08.00 v2021.03.01.00 v2021.02.22.00 v2021.02.15.00 v2021.02.08.00 v2021.02.01.00 v2021.01.25.00 v2021.01.18.01 v2021.01.18.00 v2021.01.11.00 v2021.01.04.00 v2020.12.28.00 v2020.12.21.00 v2020.12.14.00 v2020.12.07.00 v2020.11.30.00 v2020.11.23.00 v2020.11.16.00 v2020.11.09.00 v2020.11.02.00 v2020.10.26.00 v2020.10.19.00 v2020.10.12.00 v2020.10.05.00 v2020.09.28.00 v2020.09.21.00 v2020.09.14.00 v2020.09.07.00 v2020.08.31.00 v2020.08.24.00 v2020.08.17.00 v2020.08.10.00 v2020.08.03.00 v2020.07.27.00 v2020.07.20.00 v2020.07.13.00 v2020.07.06.00 v2020.06.29.00 v2020.06.15.00 v2020.06.08.00 v2020.06.01.00 v2020.05.25.00 v2020.05.18.00 v2020.05.11.00 v2020.05.04.00 v2020.04.27.00 v2020.04.20.00 v2020.04.13.00 v2020.04.06.00 v2020.03.30.00 v2020.03.23.00 v2020.03.16.00 v2020.03.09.00 v2020.03.02.00 v2020.02.24.00 v2020.02.17.00 v2020.02.10.00 v2020.02.03.00 v2020.01.27.00 v2020.01.20.00 v2020.01.13.00 v2020.01.06.00 v2019.12.30.00 v2019.12.23.00 v2019.12.16.00
No related merge requests found
......@@ -25,6 +25,7 @@
#include <folly/Optional.h>
#include <folly/Traits.h>
#include <folly/detail/AsyncTrace.h>
#include <folly/executors/ExecutorWithPriority.h>
#include <folly/executors/InlineExecutor.h>
#include <folly/executors/QueuedImmediateExecutor.h>
......@@ -720,6 +721,8 @@ SemiFuture<T>& SemiFuture<T>::operator=(Future<T>&& other) noexcept {
template <class T>
Future<T> SemiFuture<T>::via(Executor::KeepAlive<> executor) && {
folly::async_tracing::logSemiFutureVia(this->getExecutor(), executor.get());
if (!executor) {
throw_exception<FutureNoExecutor>();
}
......@@ -906,6 +909,8 @@ typename std::
template <class T>
Future<T> Future<T>::via(Executor::KeepAlive<> executor) && {
folly::async_tracing::logFutureVia(this->getExecutor(), executor.get());
this->setExecutor(std::move(executor));
auto newFuture = Future<T>(this->core_);
......@@ -921,6 +926,8 @@ Future<T> Future<T>::via(Executor::KeepAlive<> executor, int8_t priority) && {
template <class T>
Future<T> Future<T>::via(Executor::KeepAlive<> executor) & {
folly::async_tracing::logFutureVia(this->getExecutor(), executor.get());
this->throwIfInvalid();
Promise<T> p;
auto sf = p.getSemiFuture();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment