This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"fmt" | |
"go.opentelemetry.io/otel/attribute" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func BenchmarkParsePrometheusResponse(b *testing.B) { | |
data, err := os.ReadFile("testdata/instant_response.json") | |
if err != nil { | |
b.Fatalf("error while reading file: %s", err) | |
} | |
runWithMem := func(name string, f func(b *testing.B)) { | |
var m1, m2 runtime.MemStats | |
runtime.GC() | |
runtime.ReadMemStats(&m1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md | |
index 22284b655..34aa04f85 100644 | |
--- a/docs/CHANGELOG.md | |
+++ b/docs/CHANGELOG.md | |
@@ -32,7 +32,7 @@ See also [LTS releases](https://docs.victoriametrics.com/lts-releases/). | |
**Update note 1: the `--vm-disable-progress-bar` command-line flag at `vmctl` was deprecated. Use `--disable-progress-bar` instead.** | |
-* FEATURE: all VictoriaMetrics components: use constant-time comparison for comparing HTTP basic auth credentials and auth keys. This should prevent timing attacks when comparing these credentials. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6392) for details. | |
+* FEATURE: all VictoriaMetrics components: use constant-time comparison for comparing HTTP basic auth credentials and auth keys. This should prevent timing attacks when comparing these credentials. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6392) for details. Thanks to @wasim-nihal for [the pull request](https://github.com/VictoriaMe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
index c285f05e3..affb717e5 100644 | |
--- a/scrape/scrape.go | |
+++ b/scrape/scrape.go | |
@@ -1241,7 +1241,7 @@ mainLoop: | |
} | |
last = sl.scrapeAndReport(last, scrapeTime, errc) | |
- | |
+ fmt.Println("scrape timestamp", scrapeTime.UnixMilli(), "actual timestamp:", time.Now()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/vmctl/main.go b/app/vmctl/main.go | |
index 95743081f..151e9115b 100644 | |
--- a/app/vmctl/main.go | |
+++ b/app/vmctl/main.go | |
@@ -230,7 +230,7 @@ func main() { | |
if err != nil { | |
return fmt.Errorf("error initilize auth config for destination: %s", dstAddr) | |
} | |
- dstHTTPClient := &http.Client{Transport: &http.Transport{DisableKeepAlives: disableKeepAlive}} | |
+ dstHTTPClient := &http.Client{Transport: &http.Transport{DisableKeepAlives: disableKeepAlive, ResponseHeaderTimeout: time.Second * 60}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/app/vmctl/vm_native.go | |
+++ b/app/vmctl/vm_native.go | |
@@ -5,8 +5,11 @@ import ( | |
"fmt" | |
"io" | |
"log" | |
+ "net/http/httptrace" | |
+ "sort" | |
"strings" | |
"sync" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remote_write: | |
- url: http://<victoriametrics-prod>:8428/api/v1/write | |
write_relabel_configs: | |
- source_labels: [env] | |
regex: "dev" | |
action: drop | |
- url: http://<victoriametrics-dev>:8428/api/v1/write | |
write_relabel_configs: | |
- source_labels: [env] | |
regex: "prod" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Code generated by Sloth (v0.11.0): https://github.com/slok/sloth. | |
# DO NOT EDIT. | |
groups: | |
- name: sloth-slo-sli-recordings-sandbox-vmcluster-requests-availability | |
rules: | |
- record: slo:sli_error:ratio_rate5m | |
expr: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vmtag is a docker image tag for VictoriaMetrics components, | |
# which run inside the prometheus-benchmark - e.g. vmagent, vmalert, vmsingle. | |
vmtag: "v1.80.0" | |
# nodeSelector is the list of key-value pairs for selecting instances | |
# where benchmark pods should be deployed. | |
nodeSelector: {} | |
# targetsCount defines the number of nodeexporter instances to scrape. | |
# This option allows to configure the number of active time series to push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vmtag is a docker image tag for VictoriaMetrics components, | |
# which run inside the prometheus-benchmark - e.g. vmagent, vmalert, vmsingle. | |
vmtag: "v1.80.0" | |
nodeSelector: | |
app: rw-benchmark | |
# targetsCount defines the number of nodeexporter instances to scrape. | |
# This option allows to configure the number of active time series to push | |
# to remoteStorages. |
NewerOlder