You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a frequent user of Dio in my Flutter projects and find it highly efficient. However, I've encountered a need for more granular timing data for HTTP requests, similar to what's available in native iOS and Android development.
Feature Request: Detailed Request Timing Analysis
It would be extremely beneficial to have the ability to log detailed timing for each stage of an HTTP request within Dio. This includes:
DNS Lookup
TCP Handshake
SSL Handshake
Time to First Byte (TTFB)
Download Time
Such a feature would aid in performance debugging, optimization, and monitoring, providing insights comparable to native platforms.
Proposed Implementation:
Extend Interceptor with timing hooks for each stage.
Add a Dio configuration for detailed timing, outputting metrics.
Example:
Dio dio = Dio();
dio.interceptors.add(TimingInterceptor());
class TimingInterceptor extends Interceptor {
@override
Future onRequest(RequestOptions options, RequestInterceptorHandler handler) async {
final startTime = DateTime.now();
var response = await handler.next(options);
final duration = DateTime.now().difference(startTime);
print('Request Timing: $duration');
return response;
}
}
This feature would enhance Dio's capabilities and align it with native network analysis tools. I'm keen to contribute if possible.
Thank you for considering this request.
Best regards,
Solution Brainstorm
No response
The text was updated successfully, but these errors were encountered:
Hello. I wanted to follow up on this issue as it has been two weeks without any response. Could anyone provide any updates or insights on this matter? It is quite important for the projects I am currently working on, and I would greatly appreciate any feedback or suggestions on possible workarounds.
The library builds on top of high-level HTTP implementation (dart:io::HttpClient). To be aware of these sequences, AFAIK, you need to build the client from the start to override those functions or switch to other adapters like native_dio_adapter that might be helpful with platform-specific APIs. There is not much the library can do on its interface.
Request Statement
Hello Dio team,
I'm a frequent user of Dio in my Flutter projects and find it highly efficient. However, I've encountered a need for more granular timing data for HTTP requests, similar to what's available in native iOS and Android development.
Feature Request: Detailed Request Timing Analysis
It would be extremely beneficial to have the ability to log detailed timing for each stage of an HTTP request within Dio. This includes:
DNS Lookup
TCP Handshake
SSL Handshake
Time to First Byte (TTFB)
Download Time
Such a feature would aid in performance debugging, optimization, and monitoring, providing insights comparable to native platforms.
Proposed Implementation:
Extend Interceptor with timing hooks for each stage.
Add a Dio configuration for detailed timing, outputting metrics.
Example:
This feature would enhance Dio's capabilities and align it with native network analysis tools. I'm keen to contribute if possible.
Thank you for considering this request.
Best regards,
Solution Brainstorm
No response
The text was updated successfully, but these errors were encountered: