OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
report Namespace Reference

Classes

class  Row
 

Functions

def html_escape
 
def get_commit_results
 
def summary_body_rows
 
def error_code
 

Variables

dictionary params
 
string benchmark_detail_url = '{}/benchmarks/{{}}/'
 
float ZSCORE_CHECK = 2.5758293035489
 
float ZSCORE_WARNING = 3.2905267314919255
 
float ZSCORE_ERROR = 4.0
 
tuple conn = psycopg2.connect(os.environ['CONBENCH_DSN'])
 
tuple cur = conn.cursor()
 
tuple html_params = get_commit_results(cur)
 
list header = [desc[0] for desc in cur.description]
 
tuple rows = cur.fetchall()
 
dictionary stats = { 'worst_z_score': 0.0, 'nfixes': 0, 'nchecks': 0, 'nwarnings': 0, 'nerrors': 0 }
 

Function Documentation

def report.error_code ( )

Definition at line 244 of file report.py.

Referenced by EmbeddedDatabase::DBEngineImpl.createCatalog(), Executor.executePlanWithGroupBy(), Executor.executePlanWithoutGroupBy(), file_delete(), anonymous_namespace{ResultSetReductionJIT.cpp}.generate_loop_body(), UdfCompiler.generateAST(), get_filesize(), anonymous_namespace{Datum.cpp}.parseInteger(), PMemArena.PMemArena(), File_Namespace.renameForDelete(), anonymous_namespace{TableArchiver.cpp}.run(), and ReductionInterpreterImpl.runReturnEarly().

245 def error_code():
246  if stats['nerrors']:
247  return 2
248  elif stats['nwarnings']:
249  return 1
250  else:
251  return 0
252 
253 exit(error_code())
def error_code
Definition: report.py:244

+ Here is the caller graph for this function:

def report.get_commit_results (   cur)

Definition at line 58 of file report.py.

References html_escape().

58 
59 def get_commit_results(cur):
60  row = cur.fetchone()
61  return { 'author_avatar': row[0],
62  'author_name': html_escape(row[1]),
63  'branch': html_escape(row[2]),
64  'commit_message': html_escape(row[3]),
65  'commit_url': '{}/commit/{}'.format(row[4], params['sha']),
66  'short_sha': params['sha'][0:8],
67  'host': params['host'] }
def get_commit_results
Definition: report.py:58
def html_escape
Definition: report.py:55

+ Here is the call graph for this function:

def report.html_escape (   s)

Definition at line 55 of file report.py.

Referenced by get_commit_results().

55 
56 def html_escape(s):
57  return s.replace('&','&amp;').replace('<','&lt;').replace('>','&gt;')
def html_escape
Definition: report.py:55

+ Here is the caller graph for this function:

def report.summary_body_rows ( )

Definition at line 197 of file report.py.

References join().

198 def summary_body_rows():
199  return "\n".join([
200  '<tr><td>Fixed Tests</td><td class="fixed">{nfixes}</td></tr>',
201  '<tr><td>Check Tests</td><td class="check">{nchecks}</td></tr>',
202  '<tr><td>Warnings</td><td class="warning">{nwarnings}</td></tr>',
203  '<tr><td>Errors</td><td class="error">{nerrors}</td></tr>',
204  '<tr><td>Worst z_score</td><td>{worst_z_score:0.3f}</td></tr>'
205  ]).format(**stats)
206 
207 # Set html params
208 html_params['header_row'] = Row(header, None).tr('th')
209 html_params['body_rows'] = "\n".join([Row(header, row).tr('td') for row in rows])
210 html_params['summary_body_rows'] = summary_body_rows()
211 
212 # Print html report
213 print("""<!DOCTYPE html>
214 <html>
215 <head>
216  <title>Benchmarks for {branch} / {short_sha} on {host}</title>
217  <style>
218 body {{ font-family: sans-serif }}
219 table {{ border-collapse: collapse }}
220 th {{ text-align: right; padding-right: 1em }}
221 td {{ font-family: monospace; text-align: right; padding-right: 1em }}
222 td.fixed {{ background-color: LightGreen }}
223 td.check {{ background-color: Khaki }}
224 td.warning {{ background-color: Yellow }}
225 td.error {{ background-color: Red }}
226 tr:nth-child(even) {{ background-color: LightCyan }}
227  </style>
228 </head>
229 <body>
230 <h1>Benchmarks for {branch} / <a href="{commit_url}">{short_sha}</a> on {host}</h1>
231 <p><a href="{commit_url}">{commit_message}</a></p>
232 <!-- img disabled due to strict Content Security Policy for HTML Publisher Jenkins plugin -->
233 <p><!--img alt="avatar" src="{author_avatar}" height=25-->{author_name}</p>
234 <table>
235 {summary_body_rows}
236 </table>
237 <table>
238 {header_row}
239 {body_rows}
240 </table>
241 </body>
242 </html>
243 """.format(**html_params))
std::string join(T const &container, std::string const &delim)
def summary_body_rows
Definition: report.py:197

+ Here is the call graph for this function:

Variable Documentation

string report.benchmark_detail_url = '{}/benchmarks/{{}}/'

Definition at line 31 of file report.py.

tuple report.conn = psycopg2.connect(os.environ['CONBENCH_DSN'])

Definition at line 41 of file report.py.

Referenced by com.mapd.bench.Benchmark.executeQuery(), com.mapd.bench.BenchmarkCloud.executeQuery(), com.mapd.utility.SQLImporter.executeQuery(), com.mapd.utility.db_vendors.PostGis_types.find_gis_type(), com.mapd.bench.BenchmarkCloud.getConnection(), Catalog_Namespace::SysCatalog.importDataFromOldMapdDB(), com.mapd.bench.BenchmarkCloud.runQueries(), ai.heavy.jdbc.HeavyAIDatabaseMetaDataTest.set_user1(), ai.heavy.jdbc.HeavyAIDatabaseMetaDataTest.test_permissons(), com.mapd.parser.server.test.TestDBServer.testThreadedCall(), ai.heavy.jdbc.HeavyAIDatabaseMetaDataTest.tst05_user_table(), ai.heavy.jdbc.HeavyAIDatabaseMetaDataTest.tst06_user_table(), ai.heavy.jdbc.HeavyAIDatabaseMetaDataTest.tst07_user_table(), ai.heavy.jdbc.HeavyAIDatabaseMetaDataTest.tst08_user_table(), ai.heavy.jdbc.HeavyAIDatabaseMetaDataTest.tst09_user_table(), ai.heavy.jdbc.HeavyAIDatabaseMetaDataTest.tst10_heavyDB_table(), ai.heavy.jdbc.HeavyAIDatabaseMetaDataTest.tst11_user2_table(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url1(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url2(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url3(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url4(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_binary_unencrypted_query_url5(), ai.heavy.jdbc.HeavyAIGeomTest.tst1_geometry(), ai.heavy.jdbc.HeavyAIColumnTypeTest.tst1_types(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1_url_too_long(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1b_binary_encrypted_default(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1c_binary_encrypted_supplied_truststore_pkiauth_valid(), ai.heavy.jdbc.HeavyAIConnectionTest.tst1e_binary_encrypted_supplied_truststore_pkiauth_invalid(), ai.heavy.jdbc.HeavyAIGeomTest.tst2_geometry(), ai.heavy.jdbc.HeavyAIConnectionTest.tst2_http_unencrypted(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3_connect_fail(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3a_https_encrypted_without_server_validation_default_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3b_https_encrypted_without_server_validation_supplied_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3c_https_encrypted_server_validation_default_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3d_https_encrypted_with_server_validation_supplied_truststore(), ai.heavy.jdbc.HeavyAIConnectionTest.tst3e_https_insecure_encrypted_supplied_truststore_pkiauth_valid(), ai.heavy.jdbc.HeavyAIConnectionTest.tst4_connect_url_override(), and ai.heavy.jdbc.HeavyAIConnectionTest.tst5_properties_connection().

tuple report.cur = conn.cursor()

Definition at line 42 of file report.py.

Referenced by anonymous_namespace{ExternalExecutor.cpp}.vt_close(), anonymous_namespace{ExternalExecutor.cpp}.vt_column(), anonymous_namespace{ExternalExecutor.cpp}.vt_eof(), anonymous_namespace{ExternalExecutor.cpp}.vt_next(), and anonymous_namespace{ExternalExecutor.cpp}.vt_rowid().

list report.header = [desc[0] for desc in cur.description]

Definition at line 113 of file report.py.

Referenced by CpuTimer.print_timings(), com.mapd.logrunner.LogRunner.myThread.run(), anonymous_namespace{DdlCommandExecutor.cpp}.set_headers_with_type(), and File_Namespace::FileBuffer.writeHeader().

tuple report.html_params = get_commit_results(cur)

Definition at line 68 of file report.py.

dictionary report.params
Initial value:
1 = {'sha': os.environ['GIT_COMMIT'], # commit to run report on
2  'host': os.environ['BENCH_HOST'], # hostname on which to compare statistics
3  'n': 17}

Definition at line 27 of file report.py.

Referenced by org.apache.calcite.sql2rel.SqlToRelConverter.convertFrom(), DBHandler.get_device_parameters(), anonymous_namespace{QueryTemplateGenerator.cpp}.make_params(), com.mapd.common.SockTransportProperties.openServerTransportEncrypted(), QueryExecutionContext.prepareKernelParams(), and com.mapd.parser.server.ExtensionFunctionSignatureParser.toSignature().

tuple report.rows = cur.fetchall()

Definition at line 114 of file report.py.

Referenced by ColumnarResults.ColumnarResults(), ColumnarResults.compactAndCopyEntriesWithoutTargetSkipping(), ColumnarResults.compactAndCopyEntriesWithTargetSkipping(), org.apache.calcite.sql2rel.SqlToRelConverter.convertOver(), Fragmenter_Namespace.copyColumnDataOfShard(), com.mapd.testthrift.ThriftTester.doWork(), org.apache.calcite.sql.validate.SqlValidatorImpl.getTableConstructorRowType(), com.mapd.tests.HeavyDBTestClient.load_table(), com.mapd.tests.HeavyDBTestClient.load_table_binary(), com.mapd.tests.ImportAlterValidateSelectConcurrencyTest.loadTable(), ColumnarResults.locateAndCountEntries(), ColumnarResults.materializeAllColumnsThroughIteration(), ColumnarResults.materializeAllLazyColumns(), Executor.reduceSpeculativeTopN(), result_set_arrow_loopback(), ai.heavy.jdbc.HeavyAIResultSet.setFetchSize(), synthesize_metadata(), ai.heavy.jdbc.HeavyAIDatabaseMetaDataTest.test_permissons(), com.mapd.logrunner.LogRunner.theRest(), and com.mapd.parser.extension.ddl.SqlInsertValues.toString().

dictionary report.stats = { 'worst_z_score': 0.0, 'nfixes': 0, 'nchecks': 0, 'nwarnings': 0, 'nerrors': 0 }

Definition at line 116 of file report.py.

Referenced by Fragmenter_Namespace::InsertOrderFragmenter.compactRows(), foreign_storage::ParquetEncoder.getRowGroupMetadata(), foreign_storage::TypedParquetInPlaceEncoder< V, V >.getRowGroupMetadata(), TableOptimizer.recomputeDeletedColumnMetadata(), TableOptimizer.recomputeMetadata(), TableOptimizer.recomputeMetadataUnlocked(), foreign_storage.validate_and_get_column_metadata_statistics(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}.validate_column_mapping_and_row_group_metadata(), and foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}.validate_list_column_metadata_statistics().

float report.ZSCORE_CHECK = 2.5758293035489

Definition at line 34 of file report.py.

float report.ZSCORE_ERROR = 4.0

Definition at line 38 of file report.py.

float report.ZSCORE_WARNING = 3.2905267314919255

Definition at line 36 of file report.py.