Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Tomáš Trávníček
doctrine-dbal
Commits
b5c69fd3
Commit
b5c69fd3
authored
Sep 11, 2015
by
Bill Schaller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make output of DbalPerformanceTestListener cleaner
parent
45007d37
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
DbalPerformanceTestListener.php
tests/Doctrine/Tests/DbalPerformanceTestListener.php
+12
-5
No files found.
tests/Doctrine/Tests/DbalPerformanceTestListener.php
View file @
b5c69fd3
...
...
@@ -19,11 +19,15 @@ class DbalPerformanceTestListener extends \PHPUnit_Framework_BaseTestListener
// This listener only applies to performance tests.
if
(
$test
instanceof
\Doctrine\Tests\DbalPerformanceTestCase
)
{
//
I
dentify perf tests by class, method, and dataset
//
we i
dentify perf tests by class, method, and dataset
$class
=
str_replace
(
'Doctrine\Tests\DBAL\Performance\\'
,
''
,
get_class
(
$test
));
if
(
!
isset
(
$this
->
timings
[
$class
]))
{
$this
->
timings
[
$class
]
=
[];
}
// Store timing data for each test in the order they were run.
$this
->
timings
[
$class
.
"::"
.
$test
->
getName
(
true
)]
=
$test
->
getTime
();
$this
->
timings
[
$class
][
$test
->
getName
(
true
)]
=
$test
->
getTime
();
}
}
...
...
@@ -37,10 +41,13 @@ class DbalPerformanceTestListener extends \PHPUnit_Framework_BaseTestListener
{
if
(
!
empty
(
$this
->
timings
))
{
// Report timings.
print
(
"
\n
\n
Performance test results:
\n\n
"
);
print
(
"
\n
Performance test results:
\n\n
"
);
foreach
(
$this
->
timings
as
$test
=>
$time
)
{
printf
(
"%s: %.3f
\n
"
,
$test
,
$time
);
foreach
(
$this
->
timings
as
$class
=>
$tests
)
{
printf
(
"%s:
\n
"
,
$class
);
foreach
(
$tests
as
$test
=>
$time
)
{
printf
(
"
\t
%s: %.3f
\n
"
,
$test
,
$time
);
}
}
}
}
...
...
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