@@ -76,7 +76,7 @@ function toggleSidebar() {
7676 const sidebar = document . getElementById ( 'sidebar' ) ;
7777 if ( sidebar ) {
7878 const isCollapsing = ! sidebar . classList . contains ( 'collapsed' ) ;
79-
79+
8080 if ( isCollapsing ) {
8181 // Save current width before collapsing
8282 const currentWidth = sidebar . offsetWidth ;
@@ -89,7 +89,7 @@ function toggleSidebar() {
8989 sidebar . style . width = savedWidth + 'px' ;
9090 }
9191 }
92-
92+
9393 sidebar . classList . toggle ( 'collapsed' ) ;
9494 localStorage . setItem ( 'flamegraph-sidebar' , sidebar . classList . contains ( 'collapsed' ) ? 'collapsed' : 'expanded' ) ;
9595
@@ -558,11 +558,11 @@ function initSidebarResize() {
558558 isResizing = false ;
559559 resizeHandle . classList . remove ( 'resizing' ) ;
560560 document . body . classList . remove ( 'resizing-sidebar' ) ;
561-
561+
562562 // Save the new width
563563 const width = sidebar . offsetWidth ;
564564 localStorage . setItem ( 'flamegraph-sidebar-width' , width ) ;
565-
565+
566566 // Resize chart after sidebar resize
567567 setTimeout ( ( ) => {
568568 resizeChart ( ) ;
@@ -666,6 +666,7 @@ function populateProfileSummary(data) {
666666 const duration = stats . duration_sec || 0 ;
667667 const sampleRate = stats . sample_rate || ( duration > 0 ? totalSamples / duration : 0 ) ;
668668 const errorRate = stats . error_rate || 0 ;
669+ const missedSamples = stats . missed_samples || 0 ;
669670
670671 const samplesEl = document . getElementById ( 'stat-total-samples' ) ;
671672 if ( samplesEl ) samplesEl . textContent = formatNumber ( totalSamples ) ;
@@ -701,6 +702,19 @@ function populateProfileSummary(data) {
701702 const efficiencyFill = document . getElementById ( 'efficiency-fill' ) ;
702703 if ( efficiencyFill ) efficiencyFill . style . width = efficiency + '%' ;
703704 }
705+ // MissedSamples bar
706+ if ( missedSamples !== undefined && missedSamples !== null ) {
707+ const sampleEfficiency = Math . max ( 0 , missedSamples ) ;
708+
709+ const efficiencySection = document . getElementById ( 'efficiency-section' ) ;
710+ if ( efficiencySection ) efficiencySection . style . display = 'block' ;
711+
712+ const sampleEfficiencyValue = document . getElementById ( 'stat-missed-samples' ) ;
713+ if ( sampleEfficiencyValue ) sampleEfficiencyValue . textContent = sampleEfficiency . toFixed ( 1 ) + '%' ;
714+
715+ const sampleEfficiencyFill = document . getElementById ( 'missed-samples-fill' ) ;
716+ if ( sampleEfficiencyFill ) sampleEfficiencyFill . style . width = sampleEfficiency + '%' ;
717+ }
704718}
705719
706720// ============================================================================
0 commit comments