File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
extensions/ql-vscode/src/log-insights Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -80,8 +80,25 @@ export class PerformanceOverviewScanner implements EvaluationLogScanner {
8080 iterationCounts : [ ] ,
8181 } ;
8282
83+ private truncate ( name : string ) {
84+ name = name . replace ( / # [ 0 - 9 a - f ] { 8 } (? ! [ 0 - 9 a - f ] ) / , "" ) ;
85+ const limit = 300 ;
86+ if ( name . length > limit ) {
87+ const colon = name . lastIndexOf ( "::" ) ;
88+ if ( colon === - 1 ) {
89+ return `${ name . substring ( 0 , limit ) } ...` ;
90+ } else {
91+ const suffix = name . substring ( colon ) ;
92+ return `(...)${ suffix } ` ;
93+ }
94+ } else {
95+ return name ;
96+ }
97+ }
98+
8399 private getPredicateIndex ( name : string ) : number {
84100 const { nameToIndex } = this ;
101+ name = this . truncate ( name ) ;
85102 let index = nameToIndex . get ( name ) ;
86103 if ( index === undefined ) {
87104 index = nameToIndex . size ;
You can’t perform that action at this time.
0 commit comments