Mercurial > hg > orthanc-tests
annotate PerfsDb/Run.py @ 158:df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
author | am@osimis.io |
---|---|
date | Fri, 17 Aug 2018 11:58:26 +0200 |
parents | |
children | 6995d5d12d88 |
rev | line source |
---|---|
158
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
1 import argparse |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
2 from ConfigFileBuilder import ConfigFileBuilder |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
3 from TestConfig import TestConfig |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
4 from DbServer import DbServer |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
5 from DbType import DbType |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
6 from DbSize import DbSize |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
7 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
8 testConfigs = { |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
9 "mysql-small" : TestConfig(label= "mysql-small", dbSize=DbSize.Small, dbServer=DbServer(dbType=DbType.MySQL, port=2000)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
10 "pg9-small": TestConfig(label= "pg9-small", dbSize=DbSize.Small, dbServer=DbServer(dbType=DbType.PG9, port=2001)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
11 "pg10-small": TestConfig(label= "pg10-small", dbSize=DbSize.Small, dbServer=DbServer(dbType=DbType.PG10, port=2002)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
12 "pg11-small": TestConfig(label= "pg11-small", dbSize=DbSize.Small, dbServer=DbServer(dbType=DbType.PG11, port=2003)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
13 "mssql-small" : TestConfig(label= "mssql-small", dbSize=DbSize.Small, dbServer=DbServer(dbType=DbType.MSSQL, port=2004)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
14 "sqlite-small": TestConfig(label= "sqlite-small", dbSize=DbSize.Small, dbType=DbType.Sqlite), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
15 "sqliteplugin-small": TestConfig(label= "sqliteplugin-small", dbSize=DbSize.Small, dbType=DbType.SqlitePlugin), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
16 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
17 "mysql-tiny" : TestConfig(label= "mysql-tiny", dbSize=DbSize.Tiny, dbServer=DbServer(dbType=DbType.MySQL, port=3000)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
18 "pg9-tiny": TestConfig(label= "pg9-tiny", dbSize=DbSize.Tiny, dbServer=DbServer(dbType=DbType.PG9, port=3001)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
19 "pg10-tiny": TestConfig(label= "pg10-tiny", dbSize=DbSize.Tiny, dbServer=DbServer(dbType=DbType.PG10, port=3002)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
20 "pg11-tiny": TestConfig(label= "pg11-tiny", dbSize=DbSize.Tiny, dbServer=DbServer(dbType=DbType.PG11, port=3003)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
21 "mssql-tiny" : TestConfig(label= "mssql-tiny", dbSize=DbSize.Tiny, dbServer=DbServer(dbType=DbType.MSSQL, port=3004)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
22 "sqlite-tiny": TestConfig(label= "sqlite-tiny", dbSize=DbSize.Tiny, dbType=DbType.Sqlite), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
23 "sqliteplugin-tiny": TestConfig(label= "sqliteplugin-tiny", dbSize=DbSize.Tiny, dbType=DbType.SqlitePlugin), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
24 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
25 "mysql-medium" : TestConfig(label= "mysql-medium", dbSize=DbSize.Medium, dbServer=DbServer(dbType=DbType.MySQL, port=4000)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
26 "pg9-medium": TestConfig(label= "pg9-medium", dbSize=DbSize.Medium, dbServer=DbServer(dbType=DbType.PG9, port=4001)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
27 "pg10-medium": TestConfig(label= "pg10-medium", dbSize=DbSize.Medium, dbServer=DbServer(dbType=DbType.PG10, port=4002)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
28 "pg11-medium": TestConfig(label= "pg11-medium", dbSize=DbSize.Medium, dbServer=DbServer(dbType=DbType.PG11, port=4003)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
29 "mssql-medium" : TestConfig(label= "mssql-medium", dbSize=DbSize.Medium, dbServer=DbServer(dbType=DbType.MSSQL, port=4004)), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
30 "sqlite-medium": TestConfig(label= "sqlite-medium", dbSize=DbSize.Medium, dbType=DbType.Sqlite), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
31 "sqliteplugin-medium": TestConfig(label= "sqliteplugin-medium", dbSize=DbSize.Medium, dbType=DbType.SqlitePlugin), |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
32 } |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
33 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
34 selectedTestConfigs = [] |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
35 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
36 parser = argparse.ArgumentParser(description = "Initializes/Runs/Clears PerfsDb setup.") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
37 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
38 # create a cli option for each config |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
39 for testConfigName in testConfigs.keys(): |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
40 parser.add_argument("--" + testConfigName, action = "store_true") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
41 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
42 parser.add_argument("--init", help = "initializes DBs", action = "store_true") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
43 parser.add_argument("--run", help = "runs tests", action = "store_true") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
44 parser.add_argument("--clear", help = "clear DBs", action = "store_true") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
45 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
46 parser.add_argument("--orthanc-path", help = "path to the folder containing Orthanc executable", default=".") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
47 parser.add_argument("--plugins-path", help = "path to the folder containing Orthanc executable", default=".") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
48 parser.add_argument("--repeat", help = "number of times to repeat each test to average timings", type=int, default=50) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
49 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
50 args = parser.parse_args() |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
51 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
52 for testConfigName in testConfigs.keys(): |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
53 if args.__dict__[testConfigName.replace("-", "_")]: |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
54 selectedTestConfigs.append(testConfigName) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
55 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
56 # if no test config specified, take them all |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
57 if len(selectedTestConfigs) == 0: |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
58 selectedTestConfigs = testConfigs.keys() |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
59 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
60 selectedTestConfigs = sorted(selectedTestConfigs) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
61 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
62 # if no action specified, it means only run |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
63 if not (args.init | args.run | args.clear): |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
64 args.init = False |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
65 args.run = True |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
66 args.clear = False |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
67 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
68 print("***** Orthanc *******") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
69 print("path :", args.orthanc_path) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
70 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
71 results = {} |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
72 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
73 for configName in selectedTestConfigs: |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
74 testConfig = testConfigs[configName] |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
75 testConfig.setName(configName) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
76 testConfig.setRepeatCount(args.repeat) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
77 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
78 print("======= " + configName + " ========") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
79 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
80 if args.clear: |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
81 print("** Clearing Db") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
82 testConfig.clearDb() |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
83 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
84 if args.init or args.run: |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
85 print("** Generating config files") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
86 testConfig.generateOrthancConfigurationFile(args.plugins_path) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
87 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
88 print("** Launching DbServer") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
89 testConfig.launchDbServer() |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
90 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
91 print("** Launching Orthanc") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
92 orthancWasAlreadyRunning = not testConfig.launchOrthanc(args.orthanc_path) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
93 if orthancWasAlreadyRunning and len(selectedTestConfigs) > 1: |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
94 print("Error: Can't execute multiple configuration on already running Orthanc. Exit Orthanc and let this script start Orthanc instances") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
95 exit(-1) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
96 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
97 if args.init: |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
98 testConfig.initializeDb() |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
99 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
100 if args.run: |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
101 print("** Runnnig tests") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
102 results[configName] = testConfig.runTests() |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
103 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
104 print("** Stopping Orthanc") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
105 testConfig.stopOrthanc() |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
106 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
107 print("++++++++++++++ results summary +++++++++++++++") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
108 testNames = set() |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
109 resultsByTestName = {} |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
110 for configName, configResult in results.items(): |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
111 for result in configResult: |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
112 testNames.add(result.name) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
113 if not result.name in resultsByTestName: |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
114 resultsByTestName[result.name] = {} |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
115 resultsByTestName[result.name][configName] = result |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
116 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
117 headerLine = "{empty:<40}|".format(empty="") |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
118 for configName in selectedTestConfigs: |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
119 headerLine += "{configName:^15}|".format(configName=configName) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
120 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
121 print(headerLine) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
122 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
123 for testName in sorted(testNames): |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
124 resultLine = "{name:<40}|".format(name=testName) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
125 for configName in selectedTestConfigs: |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
126 resultLine += "{avg:>11.2f} ms |".format(avg = resultsByTestName[testName][configName].averageTimeInMs) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
127 print(resultLine) |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
128 |
df1f9946571c
perfs db continued: tests working with tiny DBs on all setup but the sqliteplugin
am@osimis.io
parents:
diff
changeset
|
129 print("** Done") |