Skip to content

Commit b03781b

Browse files
authored
Merge pull request #45 from oliveagle/merge-v0.1.5-to-master
Merge v0.1.5 into master - Coverage improvements and fixes
2 parents 9f57509 + 6643a7d commit b03781b

25 files changed

Lines changed: 6373 additions & 1475 deletions

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
pull_request:
7+
branches: [master, main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Go
15+
uses: actions/setup-go@v5
16+
with:
17+
go-version: '1.15'
18+
- name: Test
19+
run: go test ./...

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ _testmain.go
2424
*.test
2525
*.prof
2626
.idea
27+
coverage.out

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 oliver
3+
Copyright (c) 2021, 2015; DoltHub Authors, oliver
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
==========================================
2+
JSONPath Benchmark Report
3+
==========================================
4+
5+
Version: v0.1.4
6+
Date: 2026-01-23
7+
Go Version: go1.25.5
8+
9+
==========================================
10+
Benchmarks
11+
==========================================
12+
13+
goos: linux
14+
goarch: amd64
15+
pkg: github.com/oliveagle/jsonpath
16+
cpu: AMD RYZEN AI MAX+ 395 w/ Radeon 8060S
17+
BenchmarkJsonPathLookupCompiled-32 35118480 33.26 ns/op 0 B/op 0 allocs/op
18+
BenchmarkJsonPathLookup-32 1713906 670.7 ns/op 568 B/op 47 allocs/op
19+
BenchmarkJsonPathLookup_0-32 3803637 309.1 ns/op 272 B/op 24 allocs/op
20+
BenchmarkJsonPathLookup_1-32 1773507 655.3 ns/op 568 B/op 47 allocs/op
21+
BenchmarkJsonPathLookup_2-32 1705456 717.5 ns/op 584 B/op 49 allocs/op
22+
BenchmarkJsonPathLookup_3-32 1362768 883.8 ns/op 776 B/op 58 allocs/op
23+
BenchmarkJsonPathLookup_4-32 1431178 833.1 ns/op 720 B/op 54 allocs/op
24+
BenchmarkJsonPathLookup_5-32 588325 2039 ns/op 1426 B/op 132 allocs/op
25+
BenchmarkJsonPathLookup_6-32 102320 11595 ns/op 15265 B/op 348 allocs/op
26+
BenchmarkJsonPathLookup_7-32 101847 12036 ns/op 15657 B/op 450 allocs/op
27+
BenchmarkJsonPathLookup_8-32 1373995 852.0 ns/op 832 B/op 53 allocs/op
28+
BenchmarkJsonPathLookup_9-32 126504 9328 ns/op 14166 B/op 334 allocs/op
29+
BenchmarkJsonPathLookup_10-32 231618 4942 ns/op 3797 B/op 225 allocs/op
30+
BenchmarkJsonPathLookup_Simple-32 1728055 693.0 ns/op 568 B/op 49 allocs/op
31+
BenchmarkJsonPathLookup_Filter-32 172152 6510 ns/op 9711 B/op 227 allocs/op
32+
BenchmarkJsonPathLookup_Range-32 1479668 830.8 ns/op 720 B/op 54 allocs/op
33+
BenchmarkJsonPathLookup_Recursive-32 746787 1618 ns/op 1850 B/op 65 allocs/op
34+
BenchmarkJsonPathLookup_RootArrayFilter-32 227734 5397 ns/op 9086 B/op 169 allocs/op
35+
BenchmarkCompileAndLookup-32 237066 4844 ns/op 6778 B/op 182 allocs/op
36+
PASS
37+
ok github.com/oliveagle/jsonpath 30.683s
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
==========================================
2+
JSONPath Benchmark Report
3+
==========================================
4+
5+
Version: v0.1.5
6+
Date: 2026-01-23
7+
Go Version: go1.25.5
8+
9+
==========================================
10+
Benchmarks
11+
==========================================
12+
13+
goos: linux
14+
goarch: amd64
15+
pkg: github.com/oliveagle/jsonpath
16+
cpu: AMD RYZEN AI MAX+ 395 w/ Radeon 8060S
17+
BenchmarkJsonPathLookupCompiled-32 35843217 32.78 ns/op 0 B/op 0 allocs/op
18+
BenchmarkJsonPathLookup-32 1792260 650.9 ns/op 568 B/op 47 allocs/op
19+
BenchmarkJsonPathLookup_0-32 3874945 307.7 ns/op 272 B/op 24 allocs/op
20+
BenchmarkJsonPathLookup_1-32 1848116 662.4 ns/op 568 B/op 47 allocs/op
21+
BenchmarkJsonPathLookup_2-32 1747178 687.7 ns/op 584 B/op 49 allocs/op
22+
BenchmarkJsonPathLookup_3-32 1391294 887.9 ns/op 776 B/op 58 allocs/op
23+
BenchmarkJsonPathLookup_4-32 1427325 826.9 ns/op 720 B/op 54 allocs/op
24+
BenchmarkJsonPathLookup_5-32 572890 2075 ns/op 1426 B/op 132 allocs/op
25+
BenchmarkJsonPathLookup_6-32 105139 12016 ns/op 15265 B/op 348 allocs/op
26+
BenchmarkJsonPathLookup_7-32 101718 12179 ns/op 15657 B/op 450 allocs/op
27+
BenchmarkJsonPathLookup_8-32 1419068 856.9 ns/op 832 B/op 53 allocs/op
28+
BenchmarkJsonPathLookup_9-32 131704 9617 ns/op 14166 B/op 334 allocs/op
29+
BenchmarkJsonPathLookup_10-32 234868 5123 ns/op 3801 B/op 225 allocs/op
30+
BenchmarkJsonPathLookup_Simple-32 1755504 699.2 ns/op 568 B/op 49 allocs/op
31+
BenchmarkJsonPathLookup_Filter-32 171878 6801 ns/op 9711 B/op 227 allocs/op
32+
BenchmarkJsonPathLookup_Range-32 1367176 823.0 ns/op 720 B/op 54 allocs/op
33+
BenchmarkJsonPathLookup_Recursive-32 752602 1615 ns/op 1850 B/op 65 allocs/op
34+
BenchmarkJsonPathLookup_RootArrayFilter-32 218097 5517 ns/op 9086 B/op 169 allocs/op
35+
BenchmarkCompileAndLookup-32 255794 4995 ns/op 6778 B/op 182 allocs/op
36+
PASS
37+
ok github.com/oliveagle/jsonpath 31.044s

generate_bench.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
# Generate benchmark report for the current version
3+
4+
VERSION=${1:-$(git rev-parse --abbrev-ref HEAD)}
5+
DATE=$(date +%Y-%m-%d)
6+
OUTPUT_DIR="benchmark_reports"
7+
8+
echo "Generating benchmark report for version: $VERSION"
9+
echo "Date: $DATE"
10+
11+
# Run benchmarks and save output
12+
REPORT_FILE="${OUTPUT_DIR}/report_${VERSION}_${DATE}.txt"
13+
14+
{
15+
echo "=========================================="
16+
echo "JSONPath Benchmark Report"
17+
echo "=========================================="
18+
echo ""
19+
echo "Version: $VERSION"
20+
echo "Date: $DATE"
21+
echo "Go Version: $(go version | awk '{print $3}')"
22+
echo ""
23+
echo "=========================================="
24+
echo "Benchmarks"
25+
echo "=========================================="
26+
echo ""
27+
go test -bench=. -benchmem ./...
28+
} > "$REPORT_FILE" 2>&1
29+
30+
echo "Report saved to: $REPORT_FILE"
31+
32+
# Also print summary
33+
echo ""
34+
echo "Summary:"
35+
echo " Total benchmarks: $(grep -c "^Benchmark" "$REPORT_FILE" || echo "0")"
36+
echo " Report size: $(wc -c < "$REPORT_FILE") bytes"

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/oliveagle/jsonpath
2+
3+
go 1.15

go.sum

Whitespace-only changes.

0 commit comments

Comments
 (0)