Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit 2a0f0d6

Browse files
author
Hendrik van Antwerpen
committed
Use curated data sets for CI
1 parent 876b244 commit 2a0f0d6

File tree

8 files changed

+63
-28
lines changed

8 files changed

+63
-28
lines changed

.gitattributes

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
benchmarks/** filter=lfs diff=lfs merge=lfs -text
1+
data/*.tar.gz filter=lfs diff=lfs merge=lfs -text
2+
data/*.tgz filter=lfs diff=lfs merge=lfs -text
3+
data/*.zip filter=lfs diff=lfs merge=lfs -text

.github/workflows/ci.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
matrix:
124124
rust: [stable]
125125
env:
126-
TEST_NAME: typeorm-0.3.17
126+
TEST_NAME: typescript_minimal_project
127127
TSSG_TS: tree-sitter-stack-graphs-typescript
128128

129129
steps:
@@ -147,26 +147,27 @@ jobs:
147147
- name: Build
148148
run: cargo build --release -p ${{ env.TSSG_TS }} --features cli
149149
- name: Checkout benchmark code
150-
run: unzip benchmarks/${{ env.TEST_NAME }}.zip
150+
run: unzip data/${{ env.TEST_NAME }}.zip
151151
- name: Index
152152
run: |
153-
target/release/${{ env.TSSG_TS }} index -D ${{ env.TEST_NAME }}.sqlite --hide-error-details \
154-
${{ env.TEST_NAME }}/package.json \
155-
${{ env.TEST_NAME }}/tsconfig.json \
156-
${{ env.TEST_NAME }}/src/data-source/ \
157-
${{ env.TEST_NAME }}/src/entity-manager/
153+
target/release/${{ env.TSSG_TS }} index \
154+
-D ${{ env.TEST_NAME }}.sqlite \
155+
--hide-error-details \
156+
${{ env.TEST_NAME }}
158157
- name: Index (forced)
159158
run: |
160-
target/release/${{ env.TSSG_TS }} index -D ${{ env.TEST_NAME }}.sqlite --hide-error-details \
161-
${{ env.TEST_NAME }}/package.json \
162-
${{ env.TEST_NAME }}/tsconfig.json \
163-
${{ env.TEST_NAME }}/src/data-source/ \
164-
${{ env.TEST_NAME }}/src/entity-manager/
159+
target/release/${{ env.TSSG_TS }} index \
160+
-D ${{ env.TEST_NAME }}.sqlite \
161+
--hide-error-details \
162+
${{ env.TEST_NAME }}
165163
- name: Query
166164
run: |
167-
target/release/${{ env.TSSG_TS }} query -D ${{ env.TEST_NAME }}.sqlite definition \
168-
${{ env.TEST_NAME }}/src/data-source/DataSource.ts:6:10 \
169-
${{ env.TEST_NAME }}/src/data-source/DataSource.ts:84:23
170-
- name: Query
165+
target/release/${{ env.TSSG_TS }} query \
166+
-D ${{ env.TEST_NAME }}.sqlite \
167+
definition \
168+
${{ env.TEST_NAME }}/index.ts:3:10
169+
- name: Status
171170
run: |
172-
target/release/${{ env.TSSG_TS }} status -D ${{ env.TEST_NAME }}.sqlite --all
171+
target/release/${{ env.TSSG_TS }} status \
172+
-D ${{ env.TEST_NAME }}.sqlite \
173+
--all

.github/workflows/perf.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ env:
2020
HEAD_DIR: head
2121
HEAD_DB: head.sqlite
2222
HEAD_ARTIFACT: head-perf-results
23-
TEST_NAME: TypeScript-4.9.5
23+
TEST_NAME: typescript_benchmark
2424
TEST_REPO: microsoft/TypeScript
2525
TEST_REF: v4.9.5
26-
TEST_SRC: src/compiler
26+
TEST_SRC: src/compiler/utilities.ts
2727
MASSIF_OUT: perf.out
2828
MASSIF_REPORT: perf.txt
2929
TSSG_TS: tree-sitter-stack-graphs-typescript
@@ -223,15 +223,15 @@ jobs:
223223
- name: Checkout benchmark code
224224
if: steps.cache-head-result.outputs.cache-hit != 'true'
225225
run: |
226-
unzip ${{ env.HEAD_DIR }}/benchmarks/${{ env.TEST_NAME }}.zip
226+
unzip ${{ env.HEAD_DIR }}/data/${{ env.TEST_NAME }}.zip
227227
- name: Profile head memory
228228
if: steps.cache-head-result.outputs.cache-hit != 'true'
229229
run: |
230230
valgrind \
231231
--tool=massif \
232232
--massif-out-file=${{ env.MASSIF_OUT }} \
233233
${{ env.HEAD_DIR }}/target/release/${{ env.TSSG_TS }} \
234-
index -D ${{ env.HEAD_DB }} --max-file-time=30 --hide-error-details -- ${{ env.TEST_NAME }}/${{ env.TEST_SRC }}
234+
index -D ${{ env.HEAD_DB }} --max-file-time=30 --hide-error-details -- ${{ env.TEST_NAME }}
235235
ms_print ${{ env.MASSIF_OUT }} > ${{ env.MASSIF_REPORT }}
236236
#
237237
# Upload results

benchmarks/TypeScript-4.9.5.zip

Lines changed: 0 additions & 3 deletions
This file was deleted.

benchmarks/typeorm-0.3.17.zip

Lines changed: 0 additions & 3 deletions
This file was deleted.

data/typescript_benchmark.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Performance Benchmark
2+
3+
A set of files, taken from the TypeScript compiler v4.9.5, of different sizes:
4+
5+
```
6+
15 text files.
7+
15 unique files.
8+
0 files ignored.
9+
10+
github.com/AlDanial/cloc v 1.96 T=0.12 s (121.5 files/s, 250225.1 lines/s)
11+
---------------------------------------------------------------------------------------------
12+
File blank comment code
13+
---------------------------------------------------------------------------------------------
14+
typescript_benchmark/types.ts 1085 1548 6642
15+
typescript_benchmark/nodeFactory.ts 598 758 5544
16+
typescript_benchmark/es2015.ts 477 1082 2861
17+
typescript_benchmark/generators.ts 301 903 1985
18+
typescript_benchmark/module.ts 173 394 1437
19+
typescript_benchmark/system.ts 204 546 1195
20+
typescript_benchmark/resolutionCache.ts 112 101 920
21+
typescript_benchmark/sourcemap.ts 99 47 614
22+
typescript_benchmark/utilities.ts 64 92 371
23+
typescript_benchmark/emitNode.ts 35 87 172
24+
typescript_benchmark/es5.ts 10 40 72
25+
typescript_benchmark/node.ts 14 4 66
26+
typescript_benchmark/builderPublic.ts 8 117 56
27+
typescript_benchmark/es2019.ts 4 1 33
28+
typescript_benchmark/builderStatePublic.ts 1 0 13
29+
---------------------------------------------------------------------------------------------
30+
SUM: 3185 5720 21981
31+
---------------------------------------------------------------------------------------------
32+
```

data/typescript_benchmark.zip

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:fc602330764f803afe9b30a8848c053fce2a94719226590cf951a2c7fd7ea6fd
3+
size 238818
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:cedca7c255e95cf321db0e3b7f6f5baa0a4e30ab3294e8b05c3dfaafc188562c
3+
size 1117

0 commit comments

Comments
 (0)