Skip to content

Commit

Permalink
Merge pull request #78 from juttle/throughput-example-update
Browse files Browse the repository at this point in the history
Improving the demo juttle
  • Loading branch information
dmehra committed Mar 10, 2016
2 parents 15f8df9 + 68b37be commit 39042ee
Showing 1 changed file with 8 additions and 22 deletions.
30 changes: 8 additions & 22 deletions examples/postgres-diskstats/throughput.juttle
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,19 @@ function round(number, precision) {
)
| join host
|(
reduce value = avg(value) by diskmodel
| sort value -desc
| filter value != 0
| view barchart -title 'Average hourly throughput by disk model, GB' -categoryField 'diskmodel' -row 0;

reduce -every :1h: sum(value) by region
|(
view timechart -title 'Throughput by region, GB' -row 0 -col 0;
view timechart -title 'Hourly throughput by region, GB' -row 1 -col 0;

reduce sum(sum) by region
| put sum = round(sum, 2)
| sort sum -desc
| view table -title 'Daily throughput by region, GB' -row 0 -col 1
);

reduce -every :1h: sum(value) by pool
|(
view timechart -title 'Throughput by pool, GB' -row 1 -col 0;

reduce sum(sum) by pool
| put sum = round(sum, 2)
| sort sum -desc
| view table -title 'Daily throughput by pool, GB' -row 1 -col 1
);

reduce -every :1h: sum(value) by subregion
|(
view timechart -title 'Throughput by subregion, GB' -seriesLimit 25 -row 2 -col 0;

reduce sum(sum) by subregion
| put sum = round(sum, 2)
| sort sum -desc
| view table -title 'Daily throughput by subregion, GB' -row 2 -col 1
| view table -title 'Total GB by region' -row 1 -col 1
);
)

0 comments on commit 39042ee

Please sign in to comment.