File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
extensions/ql-vscode/src/log-insights Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1+ import { createHash } from "crypto" ;
12import type { EvaluationLogScanner } from "./log-scanner" ;
23import type { SummaryEvent } from "./log-summary" ;
34
45export interface PipelineSummary {
56 steps : string [ ] ;
67 /** Total counts for each step in the RA array, across all iterations */
78 counts : number [ ] ;
9+ hash : string ;
810}
911
1012/**
@@ -188,6 +190,7 @@ export class PerformanceOverviewScanner implements EvaluationLogScanner {
188190 const pipelineSummary = ( pipelineSummaries [ raReference ] ??= {
189191 steps : event . ra [ raReference ] ,
190192 counts : counts . map ( ( ) => 0 ) ,
193+ hash : getPipelineHash ( event . ra [ raReference ] ) ,
191194 } ) ;
192195 const { counts : totalTuplesPerStep } = pipelineSummary ;
193196 for ( let i = 0 , length = counts . length ; i < length ; ++ i ) {
@@ -232,3 +235,11 @@ export class PerformanceOverviewScanner implements EvaluationLogScanner {
232235
233236 onDone ( ) : void { }
234237}
238+
239+ function getPipelineHash ( steps : string [ ] ) {
240+ const md5 = createHash ( "md5" ) ;
241+ for ( const step of steps ) {
242+ md5 . write ( step ) ;
243+ }
244+ return md5 . digest ( "base64" ) ;
245+ }
You can’t perform that action at this time.
0 commit comments