File tree Expand file tree Collapse file tree 3 files changed +13
-32
lines changed
Expand file tree Collapse file tree 3 files changed +13
-32
lines changed Original file line number Diff line number Diff line change 22 <application
33 android : label =" benchmarks"
44 android : name =" ${applicationName}"
5- android : icon =" @mipmap/ic_launcher" >
5+ android : icon =" @mipmap/ic_launcher"
6+ android : usesCleartextTraffic =" true" >
67 <activity
78 android : name =" .MainActivity"
89 android : exported =" true"
3031 <meta-data
3132 android : name =" flutterEmbedding"
3233 android : value =" 2" />
34+
3335 </application >
3436 <!-- Required to query activities that can process text, see:
3537 https://developer.android.com/training/package-visibility and
4244 <data android : mimeType =" text/plain" />
4345 </intent >
4446 </queries >
47+
48+ <uses-permission android : name =" android.permission.INTERNET" />
4549</manifest >
Original file line number Diff line number Diff line change @@ -101,6 +101,13 @@ class _BenchmarkItemsWidgetState extends State<BenchmarkItemsWidget> {
101101 "Busy with sync... ${syncDuration .inMilliseconds }ms / $count operations" ));
102102 }
103103
104+ final latencies =
105+ _data.map ((e) => e.latency).where ((e) => e != null ).toList ();
106+ final totalLatency = latencies.fold (0 , (a, b) => a + b! .inMicroseconds);
107+ final averageLatencyMicros =
108+ latencies.isNotEmpty ? totalLatency / latencies.length : 0 ;
109+ final latencyString = (averageLatencyMicros / 1000.0 ).toStringAsFixed (1 );
110+
104111 final clearButton = TextButton .icon (
105112 label: const Text ('Delete all' ),
106113 onPressed: () {
@@ -157,7 +164,7 @@ class _BenchmarkItemsWidgetState extends State<BenchmarkItemsWidget> {
157164 overflowSpacing: 8.0 ,
158165 children: < Widget > [
159166 Text (
160- 'First sync duration: ${syncDuration .inMilliseconds }ms / $count operations' ),
167+ 'First sync duration: ${syncDuration .inMilliseconds }ms / $count operations / ${ latencyString }ms latency ' ),
161168 create100,
162169 create1000,
163170 resyncButton,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments