Skip to content
Open
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
2749a44
first stab
maurycy Mar 21, 2026
f13d34c
s/ndjson/jsonl/
maurycy Mar 21, 2026
c15d318
printing to stdout isn't a great idea
maurycy Mar 22, 2026
6a0ea81
Merge remote-tracking branch 'upstream/main' into tachyon-ndjson-kole…
maurycy Mar 30, 2026
cb27fc0
even a basic test
maurycy Mar 30, 2026
59cbb4a
separate func for end record
maurycy Mar 30, 2026
25c6922
proper name
maurycy Mar 30, 2026
67cd39a
test_jsonl_collector_with_location_info
maurycy Mar 31, 2026
7c85d47
test synthetic frames
maurycy Mar 31, 2026
3eddae8
too many new lines
maurycy Mar 31, 2026
f71252e
BUG? confusing... two ways to set skip_idle?
maurycy Mar 31, 2026
9836ffa
Merge branch 'main' into tachyon-ndjson-kolektor
maurycy Mar 31, 2026
c183109
ok, thx b4fac15613a16f9cd7b2ee32840523b399f4621f
maurycy Mar 31, 2026
f20eb52
check if it works fine with (file, loc, func, op)
maurycy Mar 31, 2026
546ce90
missing new line
maurycy Mar 31, 2026
350ad99
filter out sync coordinator
maurycy Mar 31, 2026
942d821
s/collapsed_out/jsonl_out/, less copying :D
maurycy Mar 31, 2026
bd9aefe
nicer reading
maurycy Mar 31, 2026
311a4e3
typo
maurycy Mar 31, 2026
749a868
too much copying, left-over
maurycy Mar 31, 2026
85ce978
just Counter
maurycy Mar 31, 2026
820d3b9
ruff
maurycy Mar 31, 2026
aad4b18
future-proof name
maurycy Mar 31, 2026
da3e754
future-proof iter for streaming
maurycy Mar 31, 2026
cb6ed34
truth to be told, this should be layer above
maurycy Mar 31, 2026
5a59e0b
helper
maurycy Mar 31, 2026
192e54b
reorder
maurycy Mar 31, 2026
3189a8f
eh, just copy from heatmap
maurycy Mar 31, 2026
935779f
smaller chunk; matter of taste
maurycy Mar 31, 2026
e3d8aff
test actual chunking
maurycy Mar 31, 2026
d37f07a
test edge cases
maurycy Mar 31, 2026
aaaa972
ruff
maurycy Mar 31, 2026
a9b6ccd
match pep8
maurycy Mar 31, 2026
4fb3ade
style
maurycy Mar 31, 2026
a0decb5
too defensive
maurycy Mar 31, 2026
5f1704b
too many style changes
maurycy Mar 31, 2026
f2a21fb
less style
maurycy Mar 31, 2026
15b07ba
ha! even less style...
maurycy Mar 31, 2026
148f4e2
news
maurycy Mar 31, 2026
69c5768
news: proper formatting
maurycy Mar 31, 2026
f0aa26c
claim credit!
maurycy Apr 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
check if it works fine with (file, loc, func, op)
  • Loading branch information
maurycy committed Mar 31, 2026
commit f20eb52efbb6b9a14c868affb25944d229b26cb7
Original file line number Diff line number Diff line change
Expand Up @@ -2467,6 +2467,38 @@ def test_gecko_collector_frame_format(self):
# Should have recorded 3 functions
self.assertEqual(thread["funcTable"]["length"], 3)

def test_jsonl_collector_frame_format(self):
"""Test JsonlCollector with 4-element frame format."""
collector = JsonlCollector(sample_interval_usec=1000)
collector.collect(self._make_sample_frames())

with tempfile.NamedTemporaryFile(delete=False) as f:
self.addClassCleanup(close_and_unlink, f)
collector.export(f.name)

with open(f.name, "r", encoding="utf-8") as fp:
records = [json.loads(line) for line in fp]

str_defs = {
item["str_id"]: item["value"]
for record in records
if record["type"] == "str_def"
for item in record["defs"]
}
frame_defs = [
item
for record in records
if record["type"] == "frame_def"
for item in record["defs"]
]

self.assertEqual(len(frame_defs), 3)

paths = {str_defs[item["path_str_id"]] for item in frame_defs}
funcs = {str_defs[item["func_str_id"]] for item in frame_defs}

self.assertEqual(paths, {"app.py", "utils.py", "lib.py"})
self.assertEqual(funcs, {"main", "helper", "process"})

class TestInternalFrameFiltering(unittest.TestCase):
"""Tests for filtering internal profiler frames from output."""
Expand Down