lib/memdash/server/public/charts.js in memdash-0.0.1 vs lib/memdash/server/public/charts.js in memdash-0.1.0

- old
+ new

@@ -13,10 +13,13 @@ formatString:'%#I %p' }, min: $("#gets-sets").data("gets")[0][0], max: $("#gets-sets").data("gets")[$("#gets-sets").data("gets").length - 1][0], tickInterval: "2 hours", + }, + yaxis: { + pad: 1 } }, seriesDefaults: { rendererOptions: { smooth: true @@ -25,15 +28,16 @@ series: [ {label: 'Gets', showMarker: false}, {label: 'Sets', showMarker: false}, ], legend: { - show: true + show: true, + location: "nw" }, seriesColors: ["rgb(36, 173, 227)", "rgb(227, 36, 132)"] }); - $.jqplot('hits-misses', [$("#hits-misses").data("hits"), $("#hits-misses").data("misses")], { + $.jqplot('hits-misses', [$("#hits-misses").data("hits"), $("#hits-misses").data("misses"), $("#hits-misses").data("delete-hits"), $("#hits-misses").data("delete-misses")], { title: 'Hits & Misses for the Past Day', grid: { drawBorder: false, shadow: false, background: '#fefefe' @@ -47,29 +51,33 @@ min: $("#hits-misses").data("hits")[0][0], max: $("#hits-misses").data("hits")[$("#hits-misses").data("hits").length - 1][0], tickInterval: "2 hours", }, yaxis: { - rendererOptions: { forceTickAt0: true, forceTickAt100: true } + rendererOptions: { forceTickAt0: true, forceTickAt100: true }, + pad: 1 } }, seriesDefaults: { rendererOptions: { smooth: true } }, series: [ - {label: 'Hits', showMarker: false}, - {label: 'Misses', showMarker: false} + {label: 'Get Hits', showMarker: false}, + {label: 'Get Misses', showMarker: false}, + {label: 'Delete Hits', showMarker: false}, + {label: 'Delete Misses', showMarker: false} ], legend: { - show: true + show: true, + location: "nw" }, - seriesColors: ["rgb(227, 36, 132)", "rgb(227, 193, 36)"] + seriesColors: ["rgb(227, 36, 132)", "rgb(227, 193, 36)","rgb(36, 173, 227)", "rgb(199, 255, 25)"] }); - $.jqplot('memory-usage', [$("#memory-usage").data("limit-maxbytes"), $("#memory-usage").data("bytes")], { + $.jqplot('memory-usage', [$("#memory-usage").data("engine-maxbytes"), $("#memory-usage").data("bytes")], { title: 'Cache Memory for the Past Day', grid: { drawBorder: false, shadow: false, background: '#fefefe' @@ -78,13 +86,16 @@ xaxis:{ renderer: $.jqplot.DateAxisRenderer, tickOptions: { formatString:'%#I %p' }, - min: $("#memory-usage").data("limit-maxbytes")[0][0], - max: $("#memory-usage").data("limit-maxbytes")[$("#memory-usage").data("limit-maxbytes").length - 1][0], + min: $("#memory-usage").data("engine-maxbytes")[0][0], + max: $("#memory-usage").data("engine-maxbytes")[$("#memory-usage").data("engine-maxbytes").length - 1][0], tickInterval: "2 hours", + }, + yaxis: { + pad: 1 } }, seriesDefaults: { rendererOptions: { smooth: true @@ -93,11 +104,12 @@ series: [ {label: 'Max Size (MB)', showMarker: false}, {label: 'Used (MB)', showMarker: false} ], legend: { - show: true + show: true, + location: "nw" }, seriesColors: ["rgb(227, 193, 36)", "rgb(36, 173, 227)"] }); $.jqplot('current-items', [$("#current-items").data("current-items")], { title: 'Items over the Past Day', @@ -115,11 +127,12 @@ min: $("#current-items").data("current-items")[0][0], max: $("#current-items").data("current-items")[$("#current-items").data("current-items").length - 1][0], tickInterval: "2 hours", }, yaxis: { - rendererOptions: { forceTickAt0: true, forceTickAt100: true } + rendererOptions: { forceTickAt0: true, forceTickAt100: true }, + pad: 1 } }, seriesDefaults: { rendererOptions: { smooth: true, @@ -127,10 +140,47 @@ }, series: [ {label: 'Items', showMarker: false}, ], legend: { - show: true + show: true, + location: "nw" }, seriesColors: ["rgb(227, 193, 36)"] + }); + $.jqplot('evictions', [$("#evictions").data("evictions")], { + title: 'Evictions over the Past Day', + grid: { + drawBorder: false, + shadow: false, + background: '#fefefe' + }, + axes:{ + xaxis:{ + renderer: $.jqplot.DateAxisRenderer, + tickOptions: { + formatString:'%#I %p' + }, + min: $("#evictions").data("evictions")[0][0], + max: $("#evictions").data("evictions")[$("#evictions").data("evictions").length - 1][0], + tickInterval: "2 hours", + }, + yaxis: { + rendererOptions: { forceTickAt0: true, forceTickAt100: true }, + pad: 1 + } + }, + seriesDefaults: { + rendererOptions: { + smooth: true, + } + }, + series: [ + {label: 'Items', showMarker: false}, + ], + legend: { + show: true, + location: "nw" + }, + seriesColors: ["rgb(227, 36, 132)"] }); });