Initial version of bigquery backend.

First version of bigquery backend.

Lot of TODOs. But it should be good enough for anyone who wants to try
it out. Marked experimental.

Docker-DCO-1.1-Signed-off-by: Rohit Jnagal <jnagal@google.com> (github: rjnagal)
The sample stuff is a different type of sample from the other discussion.
That is Nan's code to get the historical usage percentiles. It'll probably
go away as we move to the other format we spoke of earlier.


On Tue, Aug 26, 2014 at 4:57 PM, Rohit Jnagal <notifications@github.com>
wrote:

> In storage/bigquery/bigquery.go:
>
> > +	// Optional: Network stats.
> > +	if stats.Network != nil {
> > +		row[colRxBytes] = stats.Network.RxBytes
> > +		row[colRxErrors] = stats.Network.RxErrors
> > +		row[colTxBytes] = stats.Network.TxBytes
> > +		row[colTxErrors] = stats.Network.TxErrors
> > +	}
> > +
> > +	sample, err := info.NewSample(self.prevStats, stats)
> > +	if err != nil || sample == nil {
> > +		return
> > +	}
> > +	// TODO(jnagal): Handle per-cpu stats.
> > +
> > +	// Optional: sample duration. Unit: Nanosecond.
> > +	row[colSampleDuration] = sample.Duration
>
> The couple of fields we have now support the Sample() interface for
> storage driver. There is some inference stuff that uses it. We'll need to
> clean up these callers first.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/google/cadvisor/pull/190/files#r16738052>.
>