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
86a490ff
Commit
86a490ff
authored
Apr 05, 2017
by
Ian Hickson
Committed by
GitHub
Apr 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tracked skipped tests in technical debt benchmark (#9206)
parent
a52c7b47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
technical_debt__cost.dart
dev/devicelab/bin/tasks/technical_debt__cost.dart
+5
-1
No files found.
dev/devicelab/bin/tasks/technical_debt__cost.dart
View file @
86a490ff
...
...
@@ -13,7 +13,8 @@ import 'package:path/path.dart' as path;
// the numbers below are odd, so that the totals don't seem round. :-)
const
double
todoCost
=
1009.0
;
// about two average SWE days, in dollars
const
double
ignoreCost
=
2003.0
;
// four average SWE days, in dollars
const
double
pythonCost
=
3001.0
;
// six average SWE days, in dollars
const
double
pythonCost
=
3001.0
;
// six average SWE days, in dollars
const
double
skipCost
=
2473.0
;
// 20 hours: 5 to fix the issue we're ignoring, 15 to fix the bugs we missed because the test was off
final
RegExp
todoPattern
=
new
RegExp
(
r'(?://|#) *TODO'
);
final
RegExp
ignorePattern
=
new
RegExp
(
r'// *ignore:'
);
...
...
@@ -25,12 +26,15 @@ Future<double> findCostsForFile(File file) async {
path
.
extension
(
file
.
path
)
!=
'.yaml'
&&
path
.
extension
(
file
.
path
)
!=
'.sh'
)
return
0.0
;
final
bool
isTest
=
file
.
path
.
endsWith
(
'_test.dart'
);
double
total
=
0.0
;
for
(
String
line
in
await
file
.
readAsLines
())
{
if
(
line
.
contains
(
todoPattern
))
total
+=
todoCost
;
if
(
line
.
contains
(
ignorePattern
))
total
+=
ignoreCost
;
if
(
isTest
&&
line
.
contains
(
'skip:'
))
total
+=
skipCost
;
}
return
total
;
}
...
...
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