OmniSciDB  a5dc49c757
 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 234 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{RelAlgExecutor.cpp}.getErrorDescription(), anonymous_namespace{Datum.cpp}.parseInteger(), PMemArena.PMemArena(), File_Namespace.renameForDelete(), anonymous_namespace{TableArchiver.cpp}.run(), and ReductionInterpreterImpl.runReturnEarly().

235 def error_code():
236  if stats['nerrors']:
237  return 2
238  elif stats['nwarnings']:
239  return 1
240  else:
241  return 0
242 
243 exit(error_code())
def error_code
Definition: report.py:234

+ 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  <link rel="stylesheet" href="report.css">
218 </head>
219 <body>
220 <h1>Benchmarks for {branch} / <a href="{commit_url}">{short_sha}</a> on {host}</h1>
221 <p><a href="{commit_url}">{commit_message}</a></p>
222 <!-- img disabled due to strict Content Security Policy for HTML Publisher Jenkins plugin -->
223 <p><!--img alt="avatar" src="{author_avatar}" height=25-->{author_name}</p>
224 <table>
225 {summary_body_rows}
226 </table>
227 <table>
228 {header_row}
229 {body_rows}
230 </table>
231 </body>
232 </html>
233 """.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(), InValuesBitmap.prepareBitIsSetParams(), 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.