Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
07e06171
Unverified
Commit
07e06171
authored
Jan 14, 2019
by
Alexander Aprelev
Committed by
GitHub
Jan 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report overall and transfer timings as part of hot reload statistics, analytics. (#26537)
parent
d22cc77d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
run_hot.dart
packages/flutter_tools/lib/src/run_hot.dart
+10
-5
usage.dart
packages/flutter_tools/lib/src/usage.dart
+2
-0
No files found.
packages/flutter_tools/lib/src/run_hot.dart
View file @
07e06171
...
...
@@ -675,7 +675,7 @@ class HotRunner extends ResidentRunner {
analyticsParameters
[
kEventReloadSyncedProceduresCount
]
=
"
${details['receivedProceduresCount']}
"
;
analyticsParameters
[
kEventReloadSyncedBytes
]
=
'
${updatedDevFS.syncedBytes}
'
;
analyticsParameters
[
kEventReloadInvalidatedSourcesCount
]
=
'
${updatedDevFS.invalidatedSourcesCount}
'
;
flutterUsage
.
sendEvent
(
'hot'
,
'reload'
,
parameters:
analyticsParameters
)
;
analyticsParameters
[
kEventReloadTransferTimeInMs
]
=
'
${devFSTimer.elapsed.inMilliseconds}
'
;
final
int
loadedLibraryCount
=
reloadReport
[
'details'
][
'loadedLibraryCount'
];
final
int
finalLibraryCount
=
reloadReport
[
'details'
][
'finalLibraryCount'
];
printTrace
(
'reloaded
$loadedLibraryCount
of
$finalLibraryCount
libraries'
);
...
...
@@ -770,17 +770,22 @@ class HotRunner extends ResidentRunner {
reassembleTimer
.
elapsed
.
inMilliseconds
);
reloadTimer
.
stop
();
printTrace
(
'Hot reload performed in
${getElapsedAsMilliseconds(reloadTimer.elapsed)}
.'
);
final
Duration
reloadDuration
=
reloadTimer
.
elapsed
;
final
int
reloadInMs
=
reloadDuration
.
inMilliseconds
;
analyticsParameters
[
kEventReloadOverallTimeInMs
]
=
'
$reloadInMs
'
;
flutterUsage
.
sendEvent
(
'hot'
,
'reload'
,
parameters:
analyticsParameters
);
printTrace
(
'Hot reload performed in
$reloadInMs
.'
);
// Record complete time it took for the reload.
_addBenchmarkData
(
'hotReloadMillisecondsToFrame'
,
reloadTimer
.
elapsed
.
inMilliseconds
);
_addBenchmarkData
(
'hotReloadMillisecondsToFrame'
,
reloadInMs
);
// Only report timings if we reloaded a single view without any
// errors or timeouts.
if
((
reassembleViews
.
length
==
1
)
&&
!
reassembleAndScheduleErrors
&&
!
reassembleTimedOut
&&
shouldReportReloadTime
)
flutterUsage
.
sendTiming
(
'hot'
,
'reload'
,
reload
Timer
.
elapsed
);
flutterUsage
.
sendTiming
(
'hot'
,
'reload'
,
reload
Duration
);
return
OperationResult
(
reassembleAndScheduleErrors
?
1
:
OperationResult
.
ok
.
code
,
...
...
packages/flutter_tools/lib/src/usage.dart
View file @
07e06171
...
...
@@ -23,6 +23,8 @@ const String kEventReloadSyncedClassesCount = 'cd8';
const
String
kEventReloadSyncedProceduresCount
=
'cd9'
;
const
String
kEventReloadSyncedBytes
=
'cd10'
;
const
String
kEventReloadInvalidatedSourcesCount
=
'cd11'
;
const
String
kEventReloadTransferTimeInMs
=
'cd12'
;
const
String
kEventReloadOverallTimeInMs
=
'cd13'
;
Usage
get
flutterUsage
=>
Usage
.
instance
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment