Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c9d2283b
Commit
c9d2283b
authored
Apr 23, 2021
by
Amit Patel
Committed by
Nikola Milojevic
May 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Contributes to
https://gitlab.com/gitlab-org/gitlab/-/issues/325744
parent
2d07c4f9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
.rubocop_manual_todo.yml
.rubocop_manual_todo.yml
+0
-1
changelogs/unreleased/rubocop-performance-openstruct-ci-reports-test-suite-comparer.yml
...performance-openstruct-ci-reports-test-suite-comparer.yml
+5
-0
lib/gitlab/ci/reports/test_suite_comparer.rb
lib/gitlab/ci/reports/test_suite_comparer.rb
+3
-1
No files found.
.rubocop_manual_todo.yml
View file @
c9d2283b
...
...
@@ -2681,7 +2681,6 @@ Performance/OpenStruct:
-
'
ee/lib/gitlab/graphql/aggregations/epics/epic_node.rb'
-
'
lib/api/wikis.rb'
-
'
lib/gitlab/ci/ansi2html.rb'
-
'
lib/gitlab/ci/reports/test_suite_comparer.rb'
-
'
lib/gitlab/git/diff_collection.rb'
-
'
lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb'
-
'
lib/gitlab/testing/request_inspector_middleware.rb'
...
...
changelogs/unreleased/rubocop-performance-openstruct-ci-reports-test-suite-comparer.yml
0 → 100644
View file @
c9d2283b
---
title
:
Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/325744
merge_request
:
60086
author
:
Amit Patel @amit.savani
type
:
performance
lib/gitlab/ci/reports/test_suite_comparer.rb
View file @
c9d2283b
...
...
@@ -85,12 +85,14 @@ module Gitlab
new_errors
.
count
+
existing_errors
.
count
end
TestSummary
=
Struct
.
new
(
:new_failures
,
:existing_failures
,
:resolved_failures
,
:new_errors
,
:existing_errors
,
:resolved_errors
,
keyword_init:
true
)
# This is used to limit the presented test cases but does not affect
# total count of tests in the summary
def
limited_tests
strong_memoize
(
:limited_tests
)
do
# rubocop: disable CodeReuse/ActiveRecord
OpenStruct
.
new
(
TestSummary
.
new
(
new_failures:
new_failures
.
take
(
max_tests
),
existing_failures:
existing_failures
.
take
(
max_tests
(
new_failures
)),
resolved_failures:
resolved_failures
.
take
(
max_tests
(
new_failures
,
existing_failures
)),
...
...
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