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
6c7a2a6d
Commit
6c7a2a6d
authored
May 05, 2021
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly pass results in markdown benchmark
parent
20e92797
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
spec/benchmarks/banzai_benchmark.rb
spec/benchmarks/banzai_benchmark.rb
+11
-3
No files found.
spec/benchmarks/banzai_benchmark.rb
View file @
6c7a2a6d
...
...
@@ -88,12 +88,15 @@ RSpec.describe 'GitLab Markdown Benchmark', :aggregate_failures do
def
build_filter_text
(
pipeline
,
initial_text
)
filter_source
=
{}
input_text
=
initial_text
result
=
nil
pipeline
.
filters
.
each
do
|
filter_klass
|
filter_source
[
filter_klass
]
=
input_text
filter
=
filter_klass
.
new
(
input_text
,
context
,
result
)
output
=
filter
.
call
output
=
filter_klass
.
call
(
input_text
,
context
)
filter_source
[
filter_klass
]
=
{
input_text:
input_text
,
input_result:
result
}
input_text
=
output
result
=
filter
.
result
end
filter_source
...
...
@@ -111,7 +114,12 @@ RSpec.describe 'GitLab Markdown Benchmark', :aggregate_failures do
pipeline
.
filters
.
each
do
|
filter_klass
|
label
=
filter_klass
.
name
.
demodulize
.
delete_suffix
(
'Filter'
).
truncate
(
20
)
x
.
report
(
label
)
{
filter_klass
.
call
(
filter_source
[
filter_klass
],
context
)
}
x
.
report
(
label
)
do
filter
=
filter_klass
.
new
(
filter_source
[
filter_klass
][
:input_text
],
context
,
filter_source
[
filter_klass
][
:input_result
])
filter
.
call
end
end
x
.
compare!
...
...
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