From 5d2545829fe229fe209ea6485129cb0935d2cfae Mon Sep 17 00:00:00 2001 From: akvlad Date: Tue, 20 Feb 2024 10:56:38 +0200 Subject: [PATCH] fix: empty response error --- pyroscope/pprof-bin/pkg/pprof_bin_bg.wasm | Bin 84714 -> 84520 bytes pyroscope/pprof-bin/src/lib.rs | 22 ++++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/pyroscope/pprof-bin/pkg/pprof_bin_bg.wasm b/pyroscope/pprof-bin/pkg/pprof_bin_bg.wasm index 4162f86ed61b7e8a4e3e33055c694b19638cde6c..b7f92a70897577fa3a3a669b97b1917753cb3f45 100644 GIT binary patch delta 13680 zcmb7K34B!5xxe3?NivxwbFRXcEowMF^zVm(m zZ#n1OKi!qKWlh@7dE|MLcFIuVBTf3u54>-(VnF2S+lO0J#WFBE9NekHUHAq*0#&Ec{#o6 zI_A2S9esOMUOH#atVM0Ju3B{IWi7K7%GdRb_$CVX>To$zaw}!tK$=Z~2`g#h)mPm| z6R*9x{k$KqqU#d$g!-R&eS&^;!=lMIQiATM2WdG~K7i~)cpj!@bQ9f4T_kA(oz+Ei z%tvSq8t$UG4s}x9=mf1r>*d>MGir;s(A{)9t)tuMj0$c^P|hWflK=Ccd3Pojc%BbY zxva^4hx$lQ&S~l8!SsMgll9p}iP<^N>S!y?KTI=Zdcn2SPu^HiNBt6sf{}!(FACTC zX9&&q#YD)MA-f|-GiR6{p$S6ij_BBe8Kw`-M$F0)*~SbrQ>Zj?B)XN*(<=;-gPt3U zhhyY-i$`JPNXglhesJAh%~&s6OV`l(lKPlbBg^^>r|pT0`>fP+9wU)y$H#@p*34i~ z4;besz7C*@?lm zGs*YRoqIJq%V?2n2hF4TPu5+phsR)mH2XJc_Ri<=_87Th@Pi~|-H=mBBo++mtB3F5 zDaiKQhq%K%i4DV|L^1hvLp6TiZ?N%O*7yN_)0;j9Q~$H60l(#^TukMOn@-8fpizlW zn*TsW^T8UeLDxWSdZWh|4%q8fCW*Pd`NALWw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uh4Tgm@ZU$etRL571xzGS20hR5H%7geZrpKNvBP$ag z7QJ8*`yALa2=M2CkXmB>%IQ8p@o(icj5fx8ET?nBpcw)K`{0W`7>pMGL|vs&QtlRoG;F+lY%K;6_-uo`$fHMz`>oGn5~t#ICBL_EN)VXt{VSJoR{n;W-n}#E#kXJK9Iio7XWf_I51{g|<3& zyq4zE;OMt*6l1v;Tzpf8qHa zPcR7L;OU1a4`cX`fe+)!$HTxD;^7S)|1HEgyL(fQ7Fd@PyQ-e5^zLA6eLaovynvo2 zMtNkccrf{OcPKVsFx@FugbeKp%wS?#7N%tV98Ut)F9y@HvB5M$n~vVw@bD-Wv6)v7 iZD1MOiav%PA1J~l>o+CFChPa24r=ThJe2-B>wf@t!Gya2 diff --git a/pyroscope/pprof-bin/src/lib.rs b/pyroscope/pprof-bin/src/lib.rs index da5af679..ab28200c 100644 --- a/pyroscope/pprof-bin/src/lib.rs +++ b/pyroscope/pprof-bin/src/lib.rs @@ -180,7 +180,11 @@ fn read_uleb128(bytes: &[u8]) -> (usize, usize) { fn bfs(t: &Tree, res: &mut Vec) { let mut total: u64 = 0; - for i in t.nodes.get(&(0u64)).unwrap().iter() { + let mut root_children: &Vec = &Vec::new(); + if t.nodes.contains_key(&(0u64)) { + root_children = t.nodes.get(&(0u64)).unwrap(); + } + for i in root_children.iter() { total += i.total; } let mut lvl = Level::default(); @@ -335,7 +339,6 @@ pub fn merge_prof(id: u32, bytes: &[u8], sample_type: String) { upsert_tree(&mut ctx, id); let mut tree = ctx.get_mut(&id).unwrap(); tree.sample_type = sample_type; - let prof = Profile::decode(bytes).unwrap(); merge(&mut tree, &prof); }); @@ -366,18 +369,17 @@ pub fn export_tree(id: u32) -> Vec { let p = panic::catch_unwind(|| { let mut ctx = CTX.lock().unwrap(); let mut res = SelectMergeStacktracesResponse::default(); - if !ctx.contains_key(&id) { - return res.encode_to_vec(); - } - let tree = ctx.get(&id).unwrap(); - if tree.nodes.len() == 0 { - return res.encode_to_vec(); - } + upsert_tree(&mut ctx, id); + let mut tree = ctx.get_mut(&id).unwrap(); let mut fg = FlameGraph::default(); fg.names = tree.names.clone(); fg.max_self = tree.max_self; fg.total = 0; - for n in tree.nodes.get(&(0u64)).unwrap().iter() { + let mut root_children: &Vec = &vec![]; + if tree.nodes.contains_key(&(0u64)) { + root_children = tree.nodes.get(&(0u64)).unwrap(); + } + for n in root_children.iter() { fg.total += n.total as i64; } bfs(tree, &mut fg.levels);