Skip to content

Instantly share code, notes, and snippets.

@janmejay
Last active June 22, 2017 12:43
Show Gist options
  • Save janmejay/02408c3a27c3f12cf919d914a36f6b9c to your computer and use it in GitHub Desktop.
Save janmejay/02408c3a27c3f12cf919d914a36f6b9c to your computer and use it in GitHub Desktop.
Off-CPU data model for UI consumption
//Frame dictionary
{"FrameId1": "java.lang.blah.blah:80", "...": "..."}
//Syscall dictionary
{"SycallId1": "open()", "...": "..."}
//Data model for a unique backtrace in off-cpu stack sample tree
{
backtrace_id: 35,
ctx_switches : {
voluntary: {
count: 95,
latency_usec: {
"max" : 3500,
"q999": 3450,
"q99" : 3100,
"q98" : 2800,
"q95" : 1900,
"q90" : 1800,
"q75" : 1600,
"median" : 1300,
"mean": 1500,
"sd" : 700 },
sched_delay_usec: {
"max" : 200,
"q999": 150,
"q99" : 120,
"q98" : 100,
"q95" : 95,
"q90" : 80,
"q75" : 40,
"median" : 25,
"mean": 35,
"sd" : 14 },
migration_count: 15 },
involuntary: {
count: 22,
latency_usec: {
"max" : 350,
"q999": 345,
"q99" : 310,
"q98" : 280,
"q95" : 190,
"q90" : 180,
"q75" : 160,
"median" : 130,
"mean": 150,
"sd" : 70 },
migration_count: 3 },
syscalls: {
distinguished: [// "all entries with total time = mean * count >= q20(total-time distribution)"
{
id: 10,
count: 103,
latency_us: {
"max" : 100,
"q999": 50,
"q99" : 20,
"q98" : 10,
"q95" : 7,
"q90" : 6,
"q75" : 5,
"median" : 4,
"mean": 10,
"sd" : 8 }},
{
id: 15,
count: 56,
latency_us: {
"max" : 100,
"q999": 50,
"q99" : 20,
"q98" : 10,
"q95" : 7,
"q90" : 6,
"q75" : 5,
"median" : 4,
"mean": 10,
"sd" : 8 }}
],
others: {
ids: [19, 54, 12, 7],
count: 95,
latency_us: {
"max" : 100,
"q999": 50,
"q99" : 20,
"q98" : 10,
"q95" : 7,
"q90" : 6,
"q75" : 5,
"median" : 4,
"mean": 10,
"sd" : 8 }}}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment