Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

timecraft: add log resource type to get and describe commands #32

Merged
merged 7 commits into from
May 30, 2023

Conversation

achille-roussel
Copy link
Contributor

@achille-roussel achille-roussel commented May 30, 2023

This PR adds the log resource type to get and describe.

To list the logs:

$ ./timecraft get log
PROCESS ID                            SEGMENTS  SIZE      STARTED
edd0f0ad-df44-40f7-919c-0a8d52d6de75  1         1.71 KiB  25m ago
20b21493-0445-4a34-af97-a6b7f6658d78  1         28.5 KiB  19m ago

Then describe a specific log:

$ ./timecraft describe log 20b21493-0445-4a34-af97-a6b7f6658d78
ID:      20b21493-0445-4a34-af97-a6b7f6658d78
Size:    28.4 KiB/660 KiB +72 B (compression: 95.69%)
Start:   19m ago, Tue, 30 May 2023 04:10:55 UTC
Records: 3283 (1 batch)
---
SEGMENT  RECORDS  BATCHES  DURATION  SIZE      UNCOMPRESSED SIZE  COMPRESSED SIZE  COMPRESSION RATIO
0        3283     1        9s        28.5 KiB  660 KiB            28.4 KiB         95.69%

Or one of the log segments:

$ ./timecraft describe log 20b21493-0445-4a34-af97-a6b7f6658d78/0
Segment: 0
Size:    28.4 KiB/660 KiB +72 B (compression: 95.69%)
Start:   19m ago, Tue, 30 May 2023 04:11:06 UTC
Records: 3283 (1 batch)
---
RECORDS  FIRST OFFSET  DURATION  UNCOMPRESSED SIZE  COMPRESSED SIZE  COMPRESSION RATIO  COMPRESSION
3283     0             9s        660 KiB            28.4 KiB         95.69%             zstd

@achille-roussel achille-roussel merged commit fe71750 into main May 30, 2023
3 checks passed
@achille-roussel achille-roussel deleted the timecraft-resource-log branch May 30, 2023 07:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants