mirror of
https://github.com/prometheus/prometheus
synced 2026-04-20 22:41:05 +08:00
@@ -1,3 +1,5 @@
|
||||
//go:build demo
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
@@ -10,6 +12,14 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// Demo for https://sched.co/2EF4F
|
||||
// Recommended way:
|
||||
//
|
||||
// - Start Prom:
|
||||
// go test -tags demo -run "TestMain_PromQLCompatDemo/normal" ./cmd/prometheus/... # Will run forever and open 3 browser tabs (localhost:1234)
|
||||
//
|
||||
// - In another terminal, start Prom with compatibility flag on:
|
||||
// go test -tags demo -run "TestMain_PromQLCompatDemo/compatibility" ./cmd/prometheus/... # Will run forever and open 3 browser tabs (localhost:1235)
|
||||
func TestMain_PromQLCompatDemo(t *testing.T) {
|
||||
dir, err := os.Getwd()
|
||||
require.NoError(t, err)
|
||||
|
||||
2
go.mod
2
go.mod
@@ -110,6 +110,8 @@ require (
|
||||
github.com/bahlo/generic-list-go v0.2.0 // indirect
|
||||
github.com/basgys/goxml2json v1.1.1-0.20231018121955-e66ee54ceaad // indirect
|
||||
github.com/buger/jsonparser v1.1.1 // indirect
|
||||
github.com/efficientgo/core v1.0.0-rc.0 // indirect
|
||||
github.com/efficientgo/e2e v0.14.0 // indirect
|
||||
github.com/go-openapi/swag/cmdutils v0.25.4 // indirect
|
||||
github.com/go-openapi/swag/conv v0.25.4 // indirect
|
||||
github.com/go-openapi/swag/fileutils v0.25.4 // indirect
|
||||
|
||||
4
go.sum
4
go.sum
@@ -143,6 +143,10 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4
|
||||
github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/edsrzf/mmap-go v1.2.0 h1:hXLYlkbaPzt1SaQk+anYwKSRNhufIDCchSPkUD6dD84=
|
||||
github.com/edsrzf/mmap-go v1.2.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q=
|
||||
github.com/efficientgo/core v1.0.0-rc.0 h1:jJoA0N+C4/knWYVZ6GrdHOtDyrg8Y/TR4vFpTaqTsqs=
|
||||
github.com/efficientgo/core v1.0.0-rc.0/go.mod h1:kQa0V74HNYMfuJH6jiPiwNdpWXl4xd/K4tzlrcvYDQI=
|
||||
github.com/efficientgo/e2e v0.14.0 h1:Jxgeus4nq4COPhACC7nYRTKX1BTzSS86Z/Z2sW9W+kE=
|
||||
github.com/efficientgo/e2e v0.14.0/go.mod h1:Hi+sz0REtlhVZ8zcdeTC3j6LUEEpJpPtNjOaOKuNcgI=
|
||||
github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU=
|
||||
github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/envoyproxy/go-control-plane/envoy v1.36.0 h1:yg/JjO5E7ubRyKX3m07GF3reDNEnfOboJ0QySbH736g=
|
||||
|
||||
Reference in New Issue
Block a user