Mercurial > hg > ltpda
comparison m-toolbox/test/aorepo_proto_test/repo_test_rand_objs.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % REPO_TEST_RAND_OBJS Test repository submission/retrieval of different | |
2 % LTPDA user objects | |
3 % | |
4 % M HUeller 05-12-08 | |
5 % | |
6 % $Id: repo_test_rand_objs.m,v 1.5 2009/03/25 17:39:01 nicola Exp $ | |
7 % | |
8 | |
9 function results = repo_test_rand_objs() | |
10 | |
11 N_OBJ = 2e1; | |
12 test_timer = now; | |
13 | |
14 %% Prepares a plist with the needed parameters | |
15 pl_run = plist('RAND_N_OBJ', false, ... | |
16 'N_OBJ', N_OBJ, ... | |
17 'RAND_OBJ_TYPE', true, ... | |
18 ...%'OBJ_TYPE', '', ... | |
19 'HOSTNAME', 'btlab.science.unitn.it', ... | |
20 'DBASE', 'ltpda_test', ... | |
21 'SAVE_OBJS', false, ... | |
22 'SUBMIT', true, ... | |
23 'CONN', [], ... | |
24 'SAVE_RESULTS', false, ... | |
25 'FILESIZE', true, ... | |
26 'DIR', [], ... | |
27 'RESULTS_FILENAME','repo_test' ... | |
28 ); | |
29 | |
30 %% Runs the tests | |
31 | |
32 % for kk = 1 : N_OBJ | |
33 % results{kk} = repo_test_func(pl_run); | |
34 results = repo_test_func(pl_run); | |
35 % end | |
36 | |
37 %% Puts together a report | |
38 pl_used = find(results,'pl_used'); | |
39 import utils.const.* | |
40 | |
41 if isempty(find(pl_used, 'start_time')), start_time = datestr(test_timer,'HH:MM:SS.FFF'); stop_time = datestr(now,'HH:MM:SS.FFF'); | |
42 else start_time = find(pl_used, 'start_time'); stop_time = find(pl_used, 'stop_time'); | |
43 end | |
44 | |
45 if find(pl_used,'RAND_OBJ_TYPE'), obj_type = [num2str(N_OBJ) ' objects were generated using random user classes']; | |
46 else obj_type = [num2str(N_OBJ) ' objects were generated using only class ' find(pl_used,'OBJ_TYPE')]; | |
47 end | |
48 | |
49 if ~find(pl_used,'SUBMIT'), submission = 'Submission to repository was disabled'; | |
50 else submission = ['Submitted to database ', find(pl_used,'DBASE'), ' @ ', find(pl_used,'HOSTNAME')]; | |
51 end | |
52 | |
53 if ~find(pl_used,'SAVE_OBJS'), saved = 'No data was saved on disk'; | |
54 else saved = ['The results were saved with filename ', find(pl_used,'RESULTS_FILENAME'), ' in the folder ', find(pl_used,'DIR')]; | |
55 end | |
56 | |
57 utils.helper.msg(msg.MNAME, '%s \n %s \n %s \n %s \n %s \n %s \n %s \n %s', ... | |
58 ' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ', ' ', obj_type,... | |
59 ['Test started at ' datestr(start_time) ' and ended at ' datestr(stop_time)], ... | |
60 submission, saved, ' ',' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% '); | |
61 | |
62 | |
63 end | |
64 % END |