Documentation ¶
Overview ¶
Copyright 2020 Red Hat, Inc. jcope@redhat.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const Table = "caliper_metrics"
Table is a hardcoded table name. Will be replaced with dynamically set names.
const TimestampFormat = `2006-01-02 15:04:05`
Variables ¶
This section is empty.
Functions ¶
func ColumnsHeaders ¶
func ColumnsHeaders() []string
ColumnsHeaders defines the expected headers` for the metrics table and exists to provide a source of truth for our table format.
func NewPostgresClient ¶
Types ¶
type PostgresConfig ¶
type PostgresConfig struct {
// contains filtered or unexported fields
}
func (PostgresConfig) String ¶
func (p PostgresConfig) String() string
type Row ¶
type Row struct { Version string `db:"version"` Metric string `db:"metric"` Pod string `db:"pod"` Range string `db:"range"` Namespace string `db:"namespace"` OwnerName string `db:"owner_name"` Node string `db:"node"` QueryTime string `db:"query_time"` Q95Value float64 `db:"q95_value"` AvgValue float64 `db:"avg_value"` MaxValue float64 `db:"max_value"` MinValue float64 `db:"min_value"` InstValue float64 `db:"inst_value"` }