@@ -103,6 +103,7 @@ export interface SpanDurationsInsight extends CodeObjectInsight{
103103 currentDuration : Duration ,
104104 previousDuration : Duration
105105 changeTime : moment . Moment ,
106+ changeVerified : boolean ,
106107 } [ ]
107108}
108109export class SpanDurationsListViewItemsCreator implements IInsightListViewItemsCreator {
@@ -124,16 +125,25 @@ export class SpanDurationsListViewItemsCreator implements IInsightListViewItemsC
124125 public createListViewItem ( insight : SpanDurationsInsight ) : IListViewItem
125126 {
126127 const percentileHtmls = [ ]
128+ insight . percentiles . sort ( ( a , b ) => a . percentile - b . percentile ) ;
127129 for ( const item of insight . percentiles ) {
128130 percentileHtmls . push ( /*html*/ `<span>P${ item . percentile * 100 } </span>` ) ;
129131 percentileHtmls . push ( /*html*/ `<span>${ item . currentDuration . value } ${ item . currentDuration . unit } </span>` ) ;
130132
131- if ( item . previousDuration && item . changeTime ) {
133+ if ( item . previousDuration &&
134+ item . changeTime &&
135+ Math . abs ( item . currentDuration . raw - item . previousDuration . raw ) / item . previousDuration . raw > 0.1 ) {
132136 let verb = item . previousDuration . raw > item . currentDuration . raw ? 'dropped' : 'raised' ;
133137 percentileHtmls . push ( /*html*/ `<span class="change">${ verb } from ${ item . previousDuration . value } ${ item . previousDuration . unit } , ${ item . changeTime . fromNow ( ) } </span>` ) ;
134138 }
135139 else
136140 percentileHtmls . push ( /*html*/ `<span></span>` ) ;
141+
142+ if ( item . changeTime && item . changeVerified == false )
143+ percentileHtmls . push ( /*html*/ `<span>evaluating</span>` ) ;
144+ else
145+ percentileHtmls . push ( /*html*/ `<span></span>` ) ;
146+
137147 }
138148
139149 const html = /*html*/ `
0 commit comments