Commit c9d2283b authored by Amit Patel's avatar Amit Patel Committed by Nikola Milojevic
parent 2d07c4f9
...@@ -2681,7 +2681,6 @@ Performance/OpenStruct: ...@@ -2681,7 +2681,6 @@ Performance/OpenStruct:
- 'ee/lib/gitlab/graphql/aggregations/epics/epic_node.rb' - 'ee/lib/gitlab/graphql/aggregations/epics/epic_node.rb'
- 'lib/api/wikis.rb' - 'lib/api/wikis.rb'
- 'lib/gitlab/ci/ansi2html.rb' - 'lib/gitlab/ci/ansi2html.rb'
- 'lib/gitlab/ci/reports/test_suite_comparer.rb'
- 'lib/gitlab/git/diff_collection.rb' - 'lib/gitlab/git/diff_collection.rb'
- 'lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb' - 'lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb'
- 'lib/gitlab/testing/request_inspector_middleware.rb' - 'lib/gitlab/testing/request_inspector_middleware.rb'
......
---
title: Contributes to https://gitlab.com/gitlab-org/gitlab/-/issues/325744
merge_request: 60086
author: Amit Patel @amit.savani
type: performance
...@@ -85,12 +85,14 @@ module Gitlab ...@@ -85,12 +85,14 @@ module Gitlab
new_errors.count + existing_errors.count new_errors.count + existing_errors.count
end 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 # This is used to limit the presented test cases but does not affect
# total count of tests in the summary # total count of tests in the summary
def limited_tests def limited_tests
strong_memoize(:limited_tests) do strong_memoize(:limited_tests) do
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
OpenStruct.new( TestSummary.new(
new_failures: new_failures.take(max_tests), new_failures: new_failures.take(max_tests),
existing_failures: existing_failures.take(max_tests(new_failures)), existing_failures: existing_failures.take(max_tests(new_failures)),
resolved_failures: resolved_failures.take(max_tests(new_failures, existing_failures)), resolved_failures: resolved_failures.take(max_tests(new_failures, existing_failures)),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment