func New(refAPI, testAPI PromAPI, queryTweaks []*config.QueryTweak) *Comparer {
	var options cmp.Options
	addFloatCompareOptions(queryTweaks, &options)
	addDropResultLabelsOptions(queryTweaks, &options)
	return &Comparer{
		refAPI:         refAPI,
		testAPI:        testAPI,
		queryTweaks:    queryTweaks,
		compareOptions: options,
	}
}
New returns a new Comparer.
package comparer
import (
	"context"
	"fmt"
	"sort"
	"strings"
	"time"
	"github.com/google/go-cmp/cmp"
	"github.com/google/go-cmp/cmp/cmpopts"
	"github.com/pkg/errors"
	v1 "github.com/prometheus/client_golang/api/prometheus/v1"
	"github.com/prometheus/common/model"
	"github.com/prometheus/compliance/promql/config"
)
const (
	defaultFraction = 0.00001
	defaultMargin   = 0.0
)
type PromAPI interface {
	Query(ctx context.Context, query string, ts time.Time) (model.Value, v1.Warnings, error)
	QueryRange(ctx context.Context, query string, r v1.Range) (model.Value, v1.Warnings, error)
}
type TestCase struct {
	Query          string        `json:"query"`
	SkipComparison bool          `json:"skipComparison"`
	ShouldFail     bool          `json:"shouldFail"`
	Start          time.Time     `json:"start"`
	End            time.Time     `json:"end"`
	Resolution     time.Duration `json:"resolution"`
}
type Comparer struct {
	refAPI         PromAPI
	testAPI        PromAPI
	queryTweaks    []*config.QueryTweak
	compareOptions cmp.Options
}