Envoy: quiche: add support for QuicClock::ApproximateNow

Created on 5 Jun 2019  路  10Comments  路  Source: envoyproxy/envoy

QuicClock::ApproximateNow() provides a cheaper way to get current time than calling std::steady_clock::now(). It returns a slightly lagged timestamp which is usually within acceptable range. But currently EnvoyQuicClock implements it in the same way as Now() which does call std::steady_clock::now().

A typically implementation is to store a timestamp in each event loop and return that timestamp for ApproximateNow(). In Envoy LibeventScheduler::prepare_time_|check_time_ can serve this purpose. Since DispatcherImpl owns libeventScheduler, we can add an interface Dispatcher::getSchedulerPrepareTime() to return LibeventScheduler::prepare_time_. And instead of referencing TimeSystem in QuicClock, we can change it to reference a Dispatcher which also provides TimeSource interface.

arequic stale

All 10 comments

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

Please reopen this issue

/assign @bencebeky

@bencebeky cannot be assigned to this issue.


:cat:

Caused by: a https://github.com/envoyproxy/envoy/issues/7177#issuecomment-534642666 was created by @danzh2010.

see: more, trace.

/assign @bencebeky

@bencebeky cannot be assigned to this issue.


:cat:

Caused by: a https://github.com/envoyproxy/envoy/issues/7177#issuecomment-534643045 was created by @danzh2010.

see: more, trace.

@mattklein123 It seems that I don't have permission to assign issue. How to get the permission?

They need to be added to the org. I will send an invite.

/assign @bencebeky

Was this page helpful?
0 / 5 - 0 ratings

Related issues

phlax picture phlax  路  3Comments

dstrelau picture dstrelau  路  3Comments

justConfused picture justConfused  路  3Comments

weixiao-huang picture weixiao-huang  路  3Comments

jeremybaumont picture jeremybaumont  路  3Comments