Skip to content

Commit 00cae85

Browse files
author
Nicholas Pisarro
committed
why not benchmark the unit test?
git-svn-id: http://svn.php.net/repository/pear/packages/Text_LanguageDetect/trunk@209119 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent a3bc3df commit 00cae85

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/unittest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
require_once '../Text/LanguageDetect.php';
99
require_once 'PHPUnit.php';
10+
require_once 'Benchmark/Timer.php';
1011

1112
class langtest extends PHPUnit_TestCase {
1213

@@ -1740,9 +1741,14 @@ function test_detection()
17401741

17411742
}
17421743

1744+
$timer = new Benchmark_Timer();
1745+
1746+
$timer->start();
17431747
$suite = new PHPUnit_TestSuite('langtest');
17441748
$result = PHPUnit::run($suite);
17451749
echo $result->toString();
1750+
$timer->stop();
1751+
$timer->display();
17461752

17471753
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 encoding=utf-8: */
17481754

0 commit comments

Comments
 (0)