MCPcopy Create free account
hub / github.com/angular/dev-infra / addWorkflowPerformanceResult

Function addWorkflowPerformanceResult

ng-dev/perf/workflow/database.ts:37–54  ·  view source on GitHub ↗
(result: WorkflowPerformanceRowResult)

Source from the content-addressed store, hash-verified

35
36/** Add a single workflow performance result to the spanner database. */
37export async function addWorkflowPerformanceResult(result: WorkflowPerformanceRowResult) {
38 /** The spanner client instance. */
39 const spanner = new Spanner({
40 projectId: 'internal-200822',
41 });
42 /** The spanner instance within our project. */
43 const instance = spanner.instance('ng-measurables');
44 /** The commit performance database within our spanner instance. */
45 const database = instance.database('commit_performance');
46 /** The table holding workflow performance information. */
47 const workflowPerformanceTable = database.table('WorkflowPerformance');
48
49 try {
50 await workflowPerformanceTable.insert(result);
51 } finally {
52 await database.close();
53 }
54}

Callers 1

handlerFunction · 0.85

Calls 2

insertMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected