Skip to content

Instantly share code, notes, and snippets.

@andyreagan
Last active April 11, 2019 19:51
Show Gist options
  • Save andyreagan/488042d212f6ca0c4d44ab3a8116e15a to your computer and use it in GitHub Desktop.
Save andyreagan/488042d212f6ca0c4d44ab3a8116e15a to your computer and use it in GitHub Desktop.
Streaming blog charts
{
"config": {"view": {"width": 400, "height": 300}},
"layer": [
{
"data": {"name": "data-c0a7223f03f36353e594f8f681eb9f0c"},
"mark": {"type": "line", "point": true},
"encoding": {
"x": {"type": "quantitative", "field": "size", "title": "Chunk Size (rows)"},
"y": {"type": "quantitative", "field": "totaltime", "title": "Runtime (s)"}
}
},
{
"data": {"name": "data-c0a7223f03f36353e594f8f681eb9f0c"},
"mark": {"type": "line", "point": false, "color": "red"},
"encoding": {
"x": {"type": "quantitative", "field": "size"},
"y": {"type": "quantitative", "field": "memory", "title": "Memory (kb)"}
}
}
],
"resolve": {"scale": {"y": "independent", "x": "shared"}},
"$schema": "https://vega.github.io/schema/vega-lite/v2.6.0.json",
"datasets": {
"data-c0a7223f03f36353e594f8f681eb9f0c": [
{"size": 10000, "memory": 470012, "totaltime": 75.41},
{"size": 5000, "memory": 382816, "totaltime": 99.82},
{"size": 1000, "memory": 255760, "totaltime": 318.62},
{"size": 500, "memory": 247836, "totaltime": 596.55},
{"size": 100, "memory": 249464, "totaltime": 2829.94}
]
},
"title": {"text": "Runtime and memory for differing streaming chunk sizes.", "orient": "bottom", "anchor": "middle", "offset": 20}
}
{
"config": {"view": {"width": 400, "height": 300}},
"data": {"name": "data-4c268972bc839eae68b4b0cd98c4bc76"},
"mark": {"type": "line", "point": true},
"encoding": {
"color": {"type": "nominal", "field": "method", "title": "Method"},
"x": {"type": "quantitative", "field": "size", "title": "Dataset Size (rows)"},
"y": {"type": "quantitative", "field": "memory", "title": "Memory (kb)"}
},
"$schema": "https://vega.github.io/schema/vega-lite/v2.6.0.json",
"datasets": {
"data-4c268972bc839eae68b4b0cd98c4bc76": [
{"size": 100000, "memory": 1390396, "method": "full"},
{"size": 100000, "memory": 494352, "method": "streaming"},
{"size": 200000, "memory": 2346504, "method": "full"},
{"size": 200000, "memory": 475320, "method": "streaming"},
{"size": 300000, "memory": 3286820, "method": "full"},
{"size": 300000, "memory": 505360, "method": "streaming"},
{"size": 400000, "memory": 3570620, "method": "full"},
{"size": 400000, "memory": 484232, "method": "streaming"},
{"size": 500000, "memory": 4508716, "method": "full"},
{"size": 500000, "memory": 518168, "method": "streaming"}
]
},
"title": {"text": "Memory footprint for increasing dataset size.", "orient": "bottom", "anchor": "middle", "offset": 20}
}
{
"config": {"view": {"width": 400, "height": 300}},
"data": {"name": "data-bffbc5a44271088d02dda5494a2a1f56"},
"mark": {"type": "line", "point": true},
"encoding": {
"color": {"type": "nominal", "field": "method", "title": "Method"},
"x": {"type": "quantitative", "field": "size", "title": "Dataset Size (rows)"},
"y": {"type": "quantitative", "field": "totaltime", "title": "Runtime (s)"}
},
"$schema": "https://vega.github.io/schema/vega-lite/v2.6.0.json",
"datasets": {
"data-bffbc5a44271088d02dda5494a2a1f56": [
{"size": 100000, "totaltime": 62.14, "method": "full"},
{"size": 100000, "totaltime": 85.64, "method": "streaming"},
{"size": 200000, "totaltime": 138.97, "method": "full"},
{"size": 200000, "totaltime": 166.61, "method": "streaming"},
{"size": 300000, "totaltime": 215.36, "method": "full"},
{"size": 300000, "totaltime": 259.71, "method": "streaming"},
{"size": 400000, "totaltime": 280.48, "method": "full"},
{"size": 400000, "totaltime": 352.96, "method": "streaming"},
{"size": 500000, "totaltime": 366.61, "method": "full"},
{"size": 500000, "totaltime": 413.33, "method": "streaming"}
]
},
"title": {"text": "Runtime for increasing dataset size.", "orient": "bottom", "anchor": "middle", "offset": 20}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment