metrics: Create public aliases for internal engine metrics #1596

Merged
fyrchik merged 1 commit from acid-ant/frostfs-node:bugfix/ref-met into master 2025-01-13 10:05:02 +00:00
Member

These changes are needed to updated k6 in scope of TrueCloudLab/xk6-frostfs#187

Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com

These changes are needed to updated `k6` in scope of https://git.frostfs.info/TrueCloudLab/xk6-frostfs/issues/187 Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
acid-ant added 1 commit 2025-01-10 11:07:36 +00:00
[#xx] metrics: Extract gc and writecache metrics from engine
Some checks failed
DCO action / DCO (pull_request) Failing after 30s
Tests and linters / Run gofumpt (pull_request) Successful in 33s
Vulncheck / Vulncheck (pull_request) Successful in 1m17s
Pre-commit hooks / Pre-commit (pull_request) Successful in 1m26s
Build / Build Components (pull_request) Successful in 1m24s
Tests and linters / Tests (pull_request) Successful in 2m58s
Tests and linters / Staticcheck (pull_request) Successful in 3m7s
Tests and linters / Lint (pull_request) Successful in 3m10s
Tests and linters / Tests with -race (pull_request) Successful in 3m11s
Tests and linters / gopls check (pull_request) Successful in 3m27s
1f1d95b01f
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
acid-ant requested review from storage-core-developers 2025-01-10 11:07:37 +00:00
acid-ant requested review from storage-core-committers 2025-01-10 11:07:37 +00:00
acid-ant force-pushed bugfix/ref-met from 1f1d95b01f to 9307909ea6 2025-01-10 11:09:06 +00:00 Compare
fyrchik requested changes 2025-01-10 11:31:32 +00:00
Dismissed
fyrchik left a comment
Owner

How about this:
engine package:

type Metrics = internal.Metrics
type GCMetrics = internal.GCMetrics

In k6:

func (...) GC() engine.GCMetrics { ... }

So just add 4 aliases in this PR (3 metrics interfaces, 1 type).

How about this: `engine` package: ``` type Metrics = internal.Metrics type GCMetrics = internal.GCMetrics ``` In k6: ``` func (...) GC() engine.GCMetrics { ... } ``` So just add 4 aliases in this PR (3 metrics interfaces, 1 type).
@ -79,6 +79,14 @@ func (m *NodeMetrics) Engine() EngineMetrics {
return m.engine
}
func (m *NodeMetrics) Writecachce() WriteCacheMetrics {
Owner

s/cachce/cache/

s/cachce/cache/
Author
Member

Fixed.

Fixed.
@ -6,4 +0,0 @@
type NullBool struct {
Bool bool
Valid bool // Valid is true if Bool is not NULL
Owner

This change seems unnecessary. It was a proper type, is a string now.

This change seems unnecessary. It was a proper type, is a string now.
Author
Member

Reverted.

Reverted.
acid-ant force-pushed bugfix/ref-met from 9307909ea6 to a0b9b86394 2025-01-10 13:13:22 +00:00 Compare
acid-ant force-pushed bugfix/ref-met from a0b9b86394 to 6bc751f686 2025-01-10 13:16:23 +00:00 Compare
Author
Member

How about this:
engine package:

type Metrics = internal.Metrics
type GCMetrics = internal.GCMetrics

In k6:

func (...) GC() engine.GCMetrics { ... }

So just add 4 aliases in this PR (3 metrics interfaces, 1 type).

Agree with you, this approach is much simpler.

> How about this: > `engine` package: > ``` > type Metrics = internal.Metrics > type GCMetrics = internal.GCMetrics > ``` > > In k6: > ``` > func (...) GC() engine.GCMetrics { ... } > ``` > > So just add 4 aliases in this PR (3 metrics interfaces, 1 type). Agree with you, this approach is much simpler.
acid-ant requested review from fyrchik 2025-01-10 14:12:11 +00:00
acid-ant requested review from storage-core-committers 2025-01-10 14:12:17 +00:00
acid-ant requested review from storage-core-developers 2025-01-10 14:12:17 +00:00
a-savchuk approved these changes 2025-01-13 06:28:47 +00:00
Dismissed
fyrchik reviewed 2025-01-13 06:32:50 +00:00
@ -29,4 +29,2 @@
SetRefillStatus(shardID, path, status string)
SetEvacuationInProgress(shardID string, value bool)
WriteCache() WriteCacheMetrics
Owner

These is no need to remove them now, right?

These is no need to remove them now, right?
Author
Member

Right, redundant changes were removed.

Right, redundant changes were removed.
dstepanov-yadro approved these changes 2025-01-13 08:33:40 +00:00
Dismissed
achuprov approved these changes 2025-01-13 08:44:09 +00:00
Dismissed
acid-ant force-pushed bugfix/ref-met from 6bc751f686 to 84141702eb 2025-01-13 09:54:25 +00:00 Compare
acid-ant dismissed a-savchuk's review 2025-01-13 09:54:25 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

acid-ant dismissed dstepanov-yadro's review 2025-01-13 09:54:25 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

acid-ant dismissed achuprov's review 2025-01-13 09:54:25 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

acid-ant changed title from metrics: Extract gc and writecache metrics from engine to metrics: Create public aliases for internal engine metrics 2025-01-13 09:54:52 +00:00
acid-ant requested review from storage-core-committers 2025-01-13 10:02:43 +00:00
acid-ant requested review from storage-core-developers 2025-01-13 10:02:44 +00:00
fyrchik approved these changes 2025-01-13 10:04:54 +00:00
fyrchik merged commit 6c51f48aab into master 2025-01-13 10:05:02 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1596
No description provided.