-
Notifications
You must be signed in to change notification settings - Fork 95
app/vlinsert/insertutil: optimize LogMessageProcessor #1021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
85 commits
Select commit
Hold shift + click to select a range
d54f03a
app/vlinsert/insertutil: optimize LogMessageProcessor
vadimalekseev ec020c6
Apply suggestion from @valyala
valyala e040363
.github: update GitHub Copilot instructions to avoid nitpicking
func25 8f757a6
.github: update GitHub Copilot instructions to avoid verbosity
func25 0b44f2c
lib/logstorage: fix options(time_offset) for day_range and week_range…
func25 4ebf61e
docs: replace old grafana datasource page with links to a new one (#987)
AndrewChubatiuk 81b490d
docs: improve documentation accuracy (#1024)
func25 a3b36cf
add docs-update-flags and sync flags docs with VictoriaMetrics conven…
func25 47a1a80
LICENSE: update the end copyright year from 2025 to 2026
valyala aa598ca
lib/logstorage: add getPartitions() and putPartitions() helpers to St…
valyala d3df911
app/vlstorage: allow creating snapshots for multiple per-day partitio…
valyala 45a430a
app/vlstorage: add `-snapshotMaxAge` command-line flag for automatic …
valyala 6a9d789
docs/victorialogs/README.md: typo fix after the commit 992ff2e5c3c84f…
valyala ffa9553
docs/victorialogs: return back missing aliases, which were dropped in…
valyala 00bcf2b
all: consistently use sync.WaitGroup.Go() instead of sync.WaitGroup.A…
valyala bd78f49
vendor: update github.com/VictoriaMetrics/VictoriaMetrics from v1.134…
valyala 57161e4
lib/logstorage: optimize JSONParser.parseLogMessage a bit
valyala 46e3091
app/vlagent/kubernetescollector: add an ability to change default _st…
vadimalekseev 729e694
lib/logstorage: use string slice for LogRows.streamFields instead of …
valyala 1451315
app/vlagent/kubernetescollector: add file hashing to prevent inode co…
vadimalekseev 272f9b0
app/vlagent/kubernetescollector: fix Kubernetes system logs timestamp…
vadimalekseev c00d043
app/vlagent/kubernetescollector: add support for dynamic token and ce…
vadimalekseev 12282a0
app/vlagent/kubernetescollector/logfile.go: remove superflouos import…
valyala 3a174f6
app/vmui: add pipe titles with links to docs in autocomplete popup (#…
Loori-R a8ca089
app/vmui: add a cumulative view option to hits bar chart (#1028)
Loori-R 3530665
app/vmui: add bar count dropdown for hit charts (#1033)
Loori-R 20c79b9
app/vlselect/vmui: run `make vmui-update` after the commit 37a153d8d8…
valyala 67864dc
docs,CHANGELOG: fix snapshot creation change correctness
func25 c78b94d
app/vlinsert: add an ability to preserve values for the given set of …
valyala 8ee87c5
docs/victorialogs/CHANGELOG.md: refer to the issue related to the pre…
valyala c8b65ea
logstorage: avoid deadlock on panic while merging (#1022)
func25 56aee51
lib/logstorage/datadb.go: add a comment explaining why the strange co…
valyala 9332c57
app/vlinsert: fix typo
func25 0ecd5bd
app/vlselect: accept `step` query arg at /select/logsql/hits and /sel…
valyala afff7b7
app/vlselect/logsql: properly align `start` and `end` query args at `…
valyala af10b51
app/vmui: fix: removed per-item mouseleave reset bug (#973)
withlin a3dc314
logsql/math: prevent panic in math modulo by zero (#1018)
func25 901b5d7
update GitHub Actions for vmui workflows: optimize caching and depend…
arturminchukov 2f5fa6f
logsql: fix panic when filtering by "_stream" field (#979)
withlin 8862acc
app/vlagent/kubernetescollector: fix 'cannot set offset' panic in a b…
vadimalekseev 38cb686
lib/logstorage: follow-up for the commit 2d0f1e8f4a44f28d0f909d4978ba…
valyala 6b2c8f3
lib/logstorage: properly parse quoted _time, _stream_id and _stream n…
valyala 42b4576
vlinsert: skip empty items in comma-separated ingestion params (#971)
func25 97951fc
app/vlinsert/insertutil: follow-up for the commit 4ab0c5a2311940a7dae…
valyala 8e29214
app/vlinsert/journald: add journald remote_ip field (#964)
NaturalSpottingSmite c2160d7
app/vlinsert/journald: follow-up for the commit f7159b6e3bffd1cedbd81…
valyala a6f45db
app/vlselect/vmui: run `make vmui-update` after the commit df8b6804ac…
valyala 169b929
docs/victorialogs/CHANGELOG.md: cut v1.44.0 release
valyala b8935ae
deployment: update VictoriaLogs Docker image tag from v1.43.1 to v1.44.0
valyala 447efab
app/vlselect/logsql: properly apply time `offset` when calculating ti…
valyala a2b0367
app/vlselect/logsql: consistently use parseDuration() function for pa…
valyala 35a8016
app/vlselect/logsql: add support for `offset` http query arg at `/sel…
valyala 149e3d0
app/vlselect/logsql: deny skipping `step` arg at /select/logsql/hits …
valyala 0a7fcc3
docs: use canonical links (#1038)
makasim d818b1a
dashboards: improve cluster/single-node dashboards (#933)
func25 1abcc63
fix
func25 15a6231
dashboards/single-node: show ingestion rate for vlagent using /intern…
func25 1a7fc3f
dashboards/single-node: accounts for internal traffic in the request …
func25 9ede00f
app/vmui: fix cumulative bar chart by carrying over previous value fo…
Loori-R 0f19e61
app/vmui: fix rendering of the first bar overlapping the start of the…
Loori-R dc15b0b
app/vmui: add `offset` parameter to align bar chart data with the use…
Loori-R 3a6d86c
docs/vmalert: show how to attach sample log row via annotations (#1050)
func25 09f4a46
log/logstorage/ipv6: Support ipv6_range for VictoriaLogs (#1049)
caicancai 81daf4c
docs: fix some broken links (#1069)
hagen1778 2ce741d
CHANGELOG.md: update ipv6 changelog
func25 d7ddaad
lib/logstorage: properly apply offset to `stats by (_time:... offset …
valyala e4f89e6
lib/logstorage: follow-up for the commit 84b11bb949c38d9afdd435de795b…
valyala 7382d3c
app/vmui: fix redundant `/select/logsql/query_time_range` requests (#…
Loori-R f7bc95a
app/vmui: fix query expression reset when hiding hits chart (#1064)
Loori-R 7c391a1
app/vmui: improve responsive layout and styles (#1043)
Loori-R bab2a61
app/vmui: fix autocomplete insertion to prevent text overwrite and pr…
Loori-R 1d02c5e
lib/logstorage: properly match ipv4-encoded log fields against ipv6_r…
valyala c7d42de
go.mod: update github.com/VictoriaMetrics/VictoriaMetrics from v1.134…
valyala da6d405
app/vmui: rm TESTCASES.md as unused (#1068)
hagen1778 a00973e
app/vmui: update suggestion for development mode (#1072)
hagen1778 94614c3
app/vmui: add shortcut for line comment toggle (#1040)
Loori-R 04b2f52
dashboards: add source code data link to internal logging panel (#1074)
makasim 9e94a8f
app/vlinsert/loki: parse JSON message with trailing whitespace/newlin…
func25 d2fcbf7
app/vlinsert/loki: simplify the code a bit after the commit 0dd2ab9a2…
valyala 4564fcc
deployment/docker: update Go builder from Go1.25.6 to Go1.25.7
valyala ee4e544
deployment/docker: update base Alpine Docker image from 3.23.2 to 3.23.3
valyala c526fad
lib/logstorage: prevent from out of memory error when adding millions…
valyala c8c1a17
wip
valyala dd6c894
wip
valyala aaa4cb1
Merge branch 'public-victorialogs' into lmp-atomics
valyala File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| package insertutil | ||
|
|
||
| import ( | ||
| "net/http" | ||
| "testing" | ||
|
|
||
| "github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime" | ||
|
|
||
| "github.com/VictoriaMetrics/VictoriaLogs/lib/logstorage" | ||
| ) | ||
|
|
||
| func BenchmarkAddRow(b *testing.B) { | ||
| r, err := http.NewRequest(http.MethodPost, "https://foo.bar/baz?_stream_fields=kubernetes.pod_name,kubernetes.pod_labels.app", nil) | ||
| if err != nil { | ||
| b.Fatal(err) | ||
| } | ||
| cp, err := GetCommonParams(r) | ||
| if err != nil { | ||
| b.Fatal(err) | ||
| } | ||
|
|
||
| SetLogRowsStorage(benchmarkStorage{}) | ||
|
|
||
| ts := int64(fasttime.UnixTimestamp()) * 1e9 | ||
| rows := [][]logstorage.Field{ | ||
| { | ||
| {Name: "kubernetes.pod_name", Value: "victoria-logs-single-0"}, | ||
| {Name: "kubernetes.pod_labels.app", Value: "VictoriaLogs"}, | ||
| {Name: "kubernetes.container_name", Value: "oauth2-proxy"}, | ||
| {Name: "_msg", Value: `GET - "/ready" HTTP/1.1 "kube-probe/1.34" 200 2 0.000`}, | ||
| }, | ||
| { | ||
| {Name: "kubernetes.pod_name", Value: "victoria-logs-single-0"}, | ||
| {Name: "kubernetes.pod_labels.app", Value: "VictoriaLogs"}, | ||
| {Name: "kubernetes.container_name", Value: "oauth2-proxy"}, | ||
| {Name: "_msg", Value: `GET - "/ready" HTTP/1.1 "GoogleHC/1.0" 200 2 0.000`}, | ||
| }, | ||
| } | ||
|
|
||
| var n int | ||
| for _, row := range rows { | ||
| n += logstorage.EstimatedJSONRowLen(row) | ||
| } | ||
|
|
||
| b.SetBytes(int64(n)) | ||
| b.ReportAllocs() | ||
| b.RunParallel(func(pb *testing.PB) { | ||
| lmp := cp.NewLogMessageProcessor("test", false) | ||
| defer lmp.MustClose() | ||
|
|
||
| for pb.Next() { | ||
| for _, row := range rows { | ||
| lmp.AddRow(ts, row, -1) | ||
| } | ||
| } | ||
| }) | ||
| } | ||
|
|
||
| type benchmarkStorage struct{} | ||
|
|
||
| func (benchmarkStorage) MustAddRows(*logstorage.LogRows) { | ||
| } | ||
|
|
||
| func (benchmarkStorage) CanWriteData() error { | ||
| return nil | ||
| } | ||
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.