Mercurial > hg > ltpda
view m-toolbox/classes/tests/@ut_result_printer/printRuntimeString.m @ 52:daf4eab1a51e database-connection-manager tip
Fix. Default password should be [] not an empty string
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 07 Dec 2011 17:29:47 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line source
% PRINTRUNTIMESTRING returns a string listing the run time of the tests. % % VERSION: $Id: printRuntimeString.m,v 1.2 2010/10/26 12:18:33 hewitson Exp $ % function res = printRuntimeString(varargin) urp = varargin{1}; if nargin>1 limit = varargin{2}; else limit = inf; end % build array of runtimes runtimes = zeros(1,numel(urp.results)); for kk=1:numel(urp.results) r = urp.results(kk); runtimes(kk) = r.runtime; end % sort array [y,idx] = sort(runtimes,'descend'); results = urp.results(idx); res = sprintf('-------- Runtime ----------\n\n'); for kk=1:numel(results) r = results(kk); res = [res sprintf('%0.3f s - %s/%s\n', r.runtime, r.testClass, r.testMethod)]; if kk>limit break end end res = [res sprintf('\n\n----------------------------\n')]; end