Skip to content

feat: lossless Timestamp{Nanosecond} DEPEND_TIME coordinate - #68

Merged
Beforerr merged 1 commit into
mainfrom
timestamp
Oct 3, 2026
Merged

Beforerr merged 1 commit into
mainfrom
timestamp

Conversation

@Beforerr

@Beforerr Beforerr commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

depend_time converted Float64 Unix seconds via unix2datetime, truncating to milliseconds.

  • Now yields Timestamp{Nanosecond}, rounding Float64 seconds to the microsecond (their real resolution near the present). Plain Durations.unix2timestamp truncates, which misses the intended ns count for ~75% of ms-valued inputs (e.g. .123 -> .122999808).

  • Adds Durations dep

  • Swapped DEPEND_TIME coordinate eltype changes from DateTime to Timestamp{Nanosecond}

  • Widens compat to CommonDataFormat 0.3 (Fix TT2000 leap-second read; promote DateTime/Timestamp to the CDF epoch types CommonDataFormat.jl#74)

  • The SubVariable test endpoints move off record times (a ms DateTime t1 falls before the record at 16:27:35.676234651 under 0.3's ns-exact comparison)

@codecov

codecov Bot commented Oct 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/variable.jl 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
main 7ca2738... main / 7ca2738...
clip/dataset-epoch 7.26 ± 0.33 μs 7.16 ± 0.34 μs 1.01 ± 0.067
clip/dataset-variable 3.73 ± 0.12 μs 3.64 ± 0.12 μs 1.03 ± 0.047
clip/variable 8.57 ± 1.9 μs 8.24 ± 2 μs 1.04 ± 0.34
concat/dataset/epoch 1.98 ± 0.1 μs 1.94 ± 0.08 μs 1.02 ± 0.066
concat/dataset/variable 2.1 ± 0.1 μs 2.09 ± 0.071 μs 1.01 ± 0.059
concat/variable/array 1.8 ± 0.35 μs 1.88 ± 0.36 μs 0.96 ± 0.26
concat/variable/construct 3.98 ± 0.2 μs 3.94 ± 0.18 μs 1.01 ± 0.069
dimarray/clip 22.3 ± 1.1 μs 22.3 ± 1.2 μs 0.999 ± 0.07
dimarray/concat 22.9 ± 1.9 μs 22.2 ± 1.6 μs 1.03 ± 0.11
dimarray/single 9.38 ± 0.47 μs 8.84 ± 0.45 μs 1.06 ± 0.076
metadata/dataset 30 ± 0 ns 30 ± 0 ns 1 ± 0
metadata/dim 3.11 ± 0.09 μs 2.91 ± 0.071 μs 1.07 ± 0.041
sanitize/float-3d 12.4 ± 1.9 μs 13 ± 2.2 μs 0.951 ± 0.22
sanitize/int8 1.71 ± 0.05 μs 1.76 ± 0.059 μs 0.972 ± 0.043
sanitize/omni-v 2.25 ± 0.17 μs 2.21 ± 0.19 μs 1.02 ± 0.12
variable/disk/broadcast-realized 5.79 ± 0.84 μs 5.57 ± 1.3 μs 1.04 ± 0.28
variable/disk/maximum 3.27 ± 0.44 μs 3.26 ± 0.41 μs 1 ± 0.19
variable/disk/sum 3.04 ± 8.9 μs 3.1 ± 8.6 μs 0.978 ± 3.9
variable/materialize/elfin-flux 2.56 ± 0.51 μs 2.54 ± 0.57 μs 1.01 ± 0.3
variable/materialize/omni-v 0.461 ± 0.11 μs 0.461 ± 0.1 μs 1 ± 0.32
variable/materialized/broadcast 3.12 ± 0.38 μs 3.04 ± 0.39 μs 1.03 ± 0.18
variable/materialized/maximum 0.591 ± 0.01 μs 0.591 ± 0 μs 1 ± 0.017
variable/materialized/sum 0.34 ± 0.01 μs 0.331 ± 0.001 μs 1.03 ± 0.03
time_to_load 0.203 ± 0.0049 s 0.214 ± 0.0035 s 0.951 ± 0.028
Memory benchmarks
main 7ca2738... main / 7ca2738...
clip/dataset-epoch 0.099 k allocs: 6.66 kB 0.099 k allocs: 6.66 kB 1
clip/dataset-variable 0.047 k allocs: 4.06 kB 0.047 k allocs: 4.06 kB 1
clip/variable 0.068 k allocs: 0.0378 MB 0.068 k allocs: 0.0378 MB 1
concat/dataset/epoch 0.037 k allocs: 3.17 kB 0.037 k allocs: 3.17 kB 1
concat/dataset/variable 0.037 k allocs: 3.17 kB 0.037 k allocs: 3.17 kB 1
concat/variable/array 25 allocs: 12.4 kB 25 allocs: 12.4 kB 1
concat/variable/construct 29 allocs: 5.23 kB 29 allocs: 5.23 kB 1
dimarray/clip 0.237 k allocs: 16.4 kB 0.237 k allocs: 16.4 kB 1
dimarray/concat 0.197 k allocs: 0.0447 MB 0.197 k allocs: 0.0447 MB 1
dimarray/single 0.067 k allocs: 15.5 kB 0.067 k allocs: 15.5 kB 1
metadata/dataset 0 allocs: 0 B 0 allocs: 0 B
metadata/dim 0.041 k allocs: 3.3 kB 0.041 k allocs: 3.3 kB 1
sanitize/float-3d 27 allocs: 28.7 kB 27 allocs: 28.7 kB 1
sanitize/int8 22 allocs: 2.94 kB 22 allocs: 2.94 kB 1
sanitize/omni-v 24 allocs: 3.95 kB 24 allocs: 3.95 kB 1
variable/disk/broadcast-realized 24 allocs: 0.0561 MB 24 allocs: 0.0561 MB 1
variable/disk/maximum 12 allocs: 28 kB 12 allocs: 28 kB 1
variable/disk/sum 12 allocs: 28 kB 12 allocs: 28 kB 1
variable/materialize/elfin-flux 12 allocs: 28 kB 12 allocs: 28 kB 1
variable/materialize/omni-v 9 allocs: 3.29 kB 9 allocs: 3.29 kB 1
variable/materialized/broadcast 3 allocs: 27.6 kB 3 allocs: 27.6 kB 1
variable/materialized/maximum 0 allocs: 0 B 0 allocs: 0 B
variable/materialized/sum 0 allocs: 0 B 0 allocs: 0 B
time_to_load 0.2 k allocs: 11.7 kB 0.2 k allocs: 11.7 kB 1

@Beforerr
Beforerr force-pushed the timestamp branch 3 times, most recently from 56c3b14 to 4af4514 Compare October 2, 2026 03:21
@Beforerr
Beforerr merged commit 85fecae into main Oct 3, 2026
6 of 10 checks passed
@Beforerr
Beforerr deleted the timestamp branch October 3, 2026 02:10
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.

1 participant