make sure we don't blow through memory
make sure we don't blow through memory

this is a commit from the future!  upcoming speedups will make
b.N grow >= 10^9 which will cause out of memory errors
better fix it now and level the playing field.

~/g/s/g/r/r/metric_tank ❯❯❯ go test -run=. -bench=. -benchmem > initial
~/g/s/g/r/r/metric_tank ❯❯❯ cat initial
PASS
BenchmarkAggMetrics1000Metrics1Day-8               	       1	5660729860 ns/op	228062392 B/op	10015730 allocs/op
BenchmarkAggMetrics1kSeries2Chunks1kQueueSize-8    	2000000000	         0.05 ns/op	       0 B/op	       0 allocs/op
BenchmarkAggMetrics10kSeries2Chunks10kQueueSize-8  	       1	1505064953 ns/op	47802344 B/op	 1990894 allocs/op
BenchmarkAggMetrics100kSeries2Chunks100kQueueSize-8	       1	16369281600 ns/op	476239072 B/op	19908505 allocs/op
BenchmarkConsolidateAvgRand1M_1-8                  	      10	 182598742 ns/op	32008856 B/op	 2000033 allocs/op
BenchmarkConsolidateAvgRandWithNulls1M_1-8         	      10	 139330755 ns/op	24008524 B/op	 1000027 allocs/op
BenchmarkConsolidateAvgRand1M_2-8                  	      10	 143220273 ns/op	32004969 B/op	 2000025 allocs/op
BenchmarkConsolidateAvgRandWithNulls1M_2-8         	      20	  98254475 ns/op	16004515 B/op	 1000020 allocs/op
BenchmarkConsolidateAvgRand1M_25-8                 	      30	  61812960 ns/op	40968056 B/op	  480021 allocs/op
BenchmarkConsolidateAvgRandWithNulls1M_25-8        	      50	  49045875 ns/op	20487804 B/op	  400013 allocs/op
BenchmarkConsolidateAvgRand1M_100-8                	      50	  46049393 ns/op	40965183 B/op	  160017 allocs/op
BenchmarkConsolidateAvgRandWithNulls1M_100-8       	      50	  35081646 ns/op	20485134 B/op	  140012 allocs/op
BenchmarkConsolidateMinRand1M_1-8                  	      20	 100985317 ns/op	24008111 B/op	 1000021 allocs/op
BenchmarkConsolidateMinRandWithNulls1M_1-8         	      20	  71410033 ns/op	20007932 B/op	  500013 allocs/op
BenchmarkConsolidateMinRand1M_2-8                  	      20	  82802109 ns/op	20004096 B/op	 1000011 allocs/op
BenchmarkConsolidateMinRandWithNulls1M_2-8         	      30	  58118902 ns/op	12004292 B/op	  500015 allocs/op
BenchmarkConsolidateMinRand1M_25-8                 	      50	  39843635 ns/op	20807815 B/op	  240013 allocs/op
BenchmarkConsolidateMinRandWithNulls1M_25-8        	      50	  26662616 ns/op	10567571 B/op	  200005 allocs/op
BenchmarkConsolidateMinRand1M_100-8                	     100	  29310478 ns/op	20565032 B/op	   80010 allocs/op
BenchmarkConsolidateMinRandWithNulls1M_100-8       	     100	  18692594 ns/op	10324892 B/op	   70004 allocs/op
BenchmarkConsolidateMaxRand1M_1-8                  	      20	  98419876 ns/op	24007893 B/op	 1000015 allocs/op
BenchmarkConsolidateMaxRandWithNulls1M_1-8         	      20	  71995637 ns/op	20007945 B/op	  500013 allocs/op
BenchmarkConsolidateMaxRand1M_2-8                  	      20	  83930212 ns/op	20004347 B/op	 1000015 allocs/op
BenchmarkConsolidateMaxRandWithNulls1M_2-8         	      30	  52415588 ns/op	12004046 B/op	  500008 allocs/op
BenchmarkConsolidateMaxRand1M_25-8                 	      50	  39580950 ns/op	20807777 B/op	  240013 allocs/op
BenchmarkConsolidateMaxRandWithNulls1M_25-8        	      50	  26219169 ns/op	10567560 B/op	  200004 allocs/op
BenchmarkConsolidateMaxRand1M_100-8                	     100	  28796999 ns/op	20565026 B/op	   80010 allocs/op
BenchmarkConsolidateMaxRandWithNulls1M_100-8       	     100	  18604390 ns/op	10324899 B/op	   70004 allocs/op
BenchmarkConsolidateSumRand1M_1-8                  	      20	  99188202 ns/op	24007824 B/op	 1000016 allocs/op
BenchmarkConsolidateSumRandWithNulls1M_1-8         	      20	  71143768 ns/op	20007470 B/op	  500006 allocs/op
BenchmarkConsolidateSumRand1M_2-8                  	      20	  80475413 ns/op	20004342 B/op	 1000016 allocs/op
BenchmarkConsolidateSumRandWithNulls1M_2-8         	      30	  51512634 ns/op	12003940 B/op	  500007 allocs/op
BenchmarkConsolidateSumRand1M_25-8                 	      50	  37280725 ns/op	20807852 B/op	  240013 allocs/op
BenchmarkConsolidateSumRandWithNulls1M_25-8        	      50	  25140374 ns/op	10567662 B/op	  200006 allocs/op
BenchmarkConsolidateSumRand1M_100-8                	     100	  28309718 ns/op	20565033 B/op	   80010 allocs/op
BenchmarkConsolidateSumRandWithNulls1M_100-8       	     100	  18261723 ns/op	10324926 B/op	   70004 allocs/op
BenchmarkAlignRequests-8                           	 1000000	      1227 ns/op	     288 B/op	      10 allocs/op
BenchmarkHandler_HandleMessage-8                   	  100000	     20426 ns/op	    2906 B/op	     105 allocs/op
BenchmarkSeriesJson-8                              	   10000	    214308 ns/op	      45 B/op	       1 allocs/op
BenchmarkHttpRespJson-8                            	    3000	    518833 ns/op	     108 B/op	       1 allocs/op
ok  	github.com/raintank/raintank-metric/metric_tank	149.621s

replay/metrictank,raintank/raintank-metric,raintank/metrictank,OOM-Killer/metrictank,OOM-Killer/metrictank,OOM-Killer/metrictank,raintank/raintank-metric,raintank/raintank-metric,replay/metrictank,raintank/metrictank,replay/metrictank,replay/metrictank,raintank/metrictank,raintank/metrictank