Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1011730 // poorMansProfiling_renderFullResults

JavaX fragment (include)

1  
static new ThreadLocal<Bool> poorMansProfiling_renderFullResults_backwards;
2  
3  
static S poorMansProfiling_renderFullResults(final MultiSet<S> traces) {
4  
  int samples = poorMansProfiling_samples;
5  
  bool backwards = isTrue(getAndClearThreadLocal(poorMansProfiling_renderFullResults_backwards));
6  
  final int n = traces.size();
7  
  int percent = ratioToIntPercent(l(traces), samples);
8  
  ret (samples == 0 ? "Nothing sampled"
9  
    : percent + "% core activity [" + n2(samples, "sample") + " taken]") + "\n\n"
10  
    + joinMap(backwards ? traces.lowestFirst() : traces.highestFirst(), func(S trace) {
11  
    traces.get(trace) + "/" + n + "\n" + trace + "\n\n"
12  
  });
13  
}

Author comment

Began life as a copy of #1011689

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1011730
Snippet name: poorMansProfiling_renderFullResults
Eternal ID of this version: #1011730/11
Text MD5: 7cbba58e7ce97e7000a7882e4ea64f1d
Author: stefan
Category: javax / profiling
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-18 14:16:03
Source code size: 662 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 473 / 493
Version history: 10 change(s)
Referenced in: [show references]