Skip to content

Add golang Time.time unmarshaller - #133

Merged
Schamper merged 2 commits into
fox-it:mainfrom
JSCU-CNI:golang-ts
Aug 27, 2026
Merged

Add golang Time.time unmarshaller#133
Schamper merged 2 commits into
fox-it:mainfrom
JSCU-CNI:golang-ts

Conversation

@JSCU-CNI

Copy link
Copy Markdown
Contributor

This PR adds unmarshalling support for golang's Time.time.MarshalBinary().

Comment thread dissect/util/ts.py Outdated
References:
- https://pkg.go.dev/time
"""
_version, seconds, nanoseconds, offset = struct.unpack(">BQIh", raw)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you cache the structure in something like _GOTIME = struct.Struct(">BQIh")? You can place it just above this function.

@JSCU-CNI
JSCU-CNI requested a review from Schamper August 27, 2026 15:35
@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (aadca22) to head (656ebbe).

Files with missing lines Patch % Lines
dissect/util/ts.py 0.00% 7 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #133   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         30      30           
  Lines       2131    2138    +7     
=====================================
- Misses      2131    2138    +7     
Flag Coverage Δ
unittests 0.00% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq

codspeed-hq Bot commented Aug 27, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 10.33%

⚡ 1 improved benchmark
✅ 34 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
test_benchmark_lz4_decompress[python-large] 191.1 µs 173.2 µs +10.33%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing JSCU-CNI:golang-ts (656ebbe) with main (aadca22)

Open in CodSpeed

@Schamper
Schamper merged commit 2fbbb59 into fox-it:main Aug 27, 2026
31 of 32 checks passed
@JSCU-CNI
JSCU-CNI deleted the golang-ts branch August 27, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants