Skip to content

Commit 294f3f7

Browse files
authored
Merge pull request #4 from OxfordAbstracts/first-profile
first profile
2 parents fc3fa88 + ad75dea commit 294f3f7

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,20 @@ lint: lint-hlint ## Check project adheres to standards
7676
lint-hlint: $(bin_dir)/hlint ## Check project adheres to hlint standards
7777
$< --git
7878

79+
.PHONY: profile
80+
profile:
81+
@stack build
82+
@cd ../application/purs-projects && \
83+
(git diff --quiet && git diff --cached --quiet && git checkout 567cde598728d6a02fd22972c888e5194af383c4 || { echo "❌ dirty working directory on purs-projects, aborting checkout."; exit 1; }) && \
84+
spago install && \
85+
spago sources > .spago/sources.txt && \
86+
rm -rf output
87+
88+
@stack exec zsh -- -c 'cd ../application/purs-projects && purs compile --source-globs-file .spago/sources.txt +RTS -sprofile.txt -RTS'
89+
@mv ../application/purs-projects/profile.txt profile.txt
90+
91+
@rm ../application/purs-projects/output/Schema.AdminDashboard/externs.cbor
92+
@stack exec zsh -- -c 'cd ../application/purs-projects && purs compile --source-globs-file .spago/sources.txt +RTS -sprofile.txt -RTS'
93+
@mv ../application/purs-projects/profile.txt profile-admin.txt
94+
7995
.PHONY : build build-dirty run install ghci test test-ghci test-profiling ghcid dev-deps license-generator clean lint lint-hlint

profile-admin.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
'purs' 'compile' '--source-globs-file' '.spago/sources.txt' +RTS '-N' '-sprofile.txt'
2+
1,881,065,351,416 bytes allocated in the heap
3+
573,448,796,456 bytes copied during GC
4+
6,854,605,176 bytes maximum residency (51 sample(s))
5+
96,912,208 bytes maximum slop
6+
19822 MiB total memory in use (0 MB lost due to fragmentation)
7+
8+
Tot time (elapsed) Avg pause Max pause
9+
Gen 0 112618 colls, 112618 par 556.187s 189.050s 0.0017s 0.0491s
10+
Gen 1 51 colls, 50 par 233.076s 122.893s 2.4097s 4.1721s
11+
12+
Parallel GC work balance: 72.00% (serial 0%, perfect 100%)
13+
14+
TASKS: 45 (1 bound, 44 peak workers (44 total), using -N10)
15+
16+
SPARKS: 7516 (7516 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)
17+
18+
INIT time 0.000s ( 0.004s elapsed)
19+
MUT time 746.850s (124.852s elapsed)
20+
GC time 789.263s (311.943s elapsed)
21+
EXIT time 0.126s ( 0.007s elapsed)
22+
Total time 1536.239s (436.806s elapsed)
23+
24+
Alloc rate 2,518,666,039 bytes per MUT second
25+
26+
Productivity 48.6% of total user, 28.6% of total elapsed
27+

profile.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
'purs' 'compile' '--source-globs-file' '.spago/sources.txt' +RTS '-N' '-sprofile.txt'
2+
3,482,404,119,952 bytes allocated in the heap
3+
907,304,406,504 bytes copied during GC
4+
4,217,119,128 bytes maximum residency (133 sample(s))
5+
75,523,008 bytes maximum slop
6+
11887 MiB total memory in use (0 MB lost due to fragmentation)
7+
8+
Tot time (elapsed) Avg pause Max pause
9+
Gen 0 173582 colls, 173582 par 885.786s 237.209s 0.0014s 0.0167s
10+
Gen 1 133 colls, 132 par 347.505s 47.618s 0.3580s 0.5545s
11+
12+
Parallel GC work balance: 71.47% (serial 0%, perfect 100%)
13+
14+
TASKS: 42 (1 bound, 41 peak workers (41 total), using -N10)
15+
16+
SPARKS: 7516 (7516 converted, 0 overflowed, 0 dud, 0 GC'd, 0 fizzled)
17+
18+
INIT time 0.000s ( 0.008s elapsed)
19+
MUT time 1332.818s (174.863s elapsed)
20+
GC time 1233.290s (284.827s elapsed)
21+
EXIT time 0.050s ( 0.001s elapsed)
22+
Total time 2566.158s (459.698s elapsed)
23+
24+
Alloc rate 2,612,813,741 bytes per MUT second
25+
26+
Productivity 51.9% of total user, 38.0% of total elapsed
27+

0 commit comments

Comments
 (0)