| Line | Exclusive | Inclusive | Code |
|---|---|---|---|
| 1 | #= | ||
| 2 | A comment filling up | ||
| 3 | a few lines | ||
| 4 | until we reach | ||
| 5 | line number | ||
| 6 | 8 | ||
| 7 | =# | ||
| 8 | 1 (33 %) | 1 (33 %) |
1 (33 %)
samples spent in helper_function
function helper_function()
1 (100 %) (ex.), 1 (100 %) (incl.) when called from main_function line 15 |
| 9 | return true | ||
| 10 | end | ||
| 11 | |||
| 12 | #= | ||
| 13 | Another comment | ||
| 14 | =# | ||
| 15 | 1 (33 %) | 3 (100 %) | function main_function() |
| 16 | return helper_function() | ||
| 17 | end |
| Exclusive | Report |
|---|---|
| 2 (67 %) | fake-source.jl |
| Exclusive | Inclusive | Method |
|---|---|---|
| 1 (33 %) | 3 (100 %) | main_function |
| 1 (33 %) | 1 (33 %) | hidden_function |
| 1 (33 %) | 1 (33 %) | helper_function |
| Exclusive | Report |
|---|---|
| 2 (67 %) | fake-source.jl |
| Exclusive | Inclusive | Method |
|---|---|---|
| 1 (33 %) | 3 (100 %) | main_function |
| 1 (33 %) | 1 (33 %) | hidden_function |
| 1 (33 %) | 1 (33 %) | helper_function |
This source file was not available when this report was generated.
================================================ FILE: test/golden/statprofiler.css ================================================ .report-header { height: 10ex; background-color: #04b431; background-color: #298a08; padding: 1ex; color: #ffffff; margin-bottom: 2ex; } .report-header a { color: #ffffff; text-decoration: none; font-size: 80%; } .report-link { } .report-title { padding-top: 1ex; padding-bottom: 1ex; float: left; font-size: 200%; } .generated-on { padding-top: 5ex; float: right; text-align: right; } #body-content { margin: 1ex; } body { margin: 0px; font-family: sans-serif; } table { border-collapse: collapse; /* border-spacing: 0px; */ } table.sortable th:not(.sorttable_sorted):not(.sorttable_sorted_reverse):not(.sorttable_nosort):after { content: " \25B4\25BE" } th { border: solid 1px #c0c0c0; padding-right: 0.5ex; font-size: 80%; } td { border: solid 1px #c0c0c0; padding-left: 0.5ex; padding-right: 0.5ex; } .call-sites { font-family: monospace; padding-left: 1.5em; margin-bottom: 1em; color: #707070; } .callees { font-family: monospace; padding-left: 1.5em; margin-bottom: 1em; color: #707070; } .code { font-family: monospace; white-space: pre; } ================================================ FILE: test/runtests.jl ================================================ using StatProfilerHTML using Random using Test using Profile using Base.StackTraces: StackFrame using Dates: DateTime, @dateformat_str using StatProfilerHTML.Reports: DUMMY_SEPARATOR, Report, TracePoint, TraceCounts const NOW = DateTime("2022-12-31", dateformat"y-m-d") const STARTPATH = @__DIR__ const TEST_REPORT = begin filename = Symbol(joinpath(STARTPATH, "fake-source.jl")) dangling_filename = Symbol(joinpath(STARTPATH, "non-existing-source.jl")) sf1 = StackFrame(:helper_function, filename, 8) sf2 = StackFrame(:main_function, filename, 15) sf3 = StackFrame(:hidden_function, dangling_filename, 20) tp1 = TracePoint(sf1) tp2 = TracePoint(sf2) tp3 = TracePoint(sf3) fp1 = tp1.containing_function fp2 = tp2.containing_function ip1 = UInt64(0x22) ip2 = UInt64(0x42) ip2 = UInt64(0x42) ip3 = UInt64(0x43) sep = DUMMY_SEPARATOR r = Report(UInt64[ip1, ip2, sep..., ip2, sep..., ip3, ip2, sep...], Dict(ip1 => [sf1], ip2 => [sf2], ip3 => [sf3]), false, NOW, STARTPATH) end @testset "StatProfilerHTML" begin include("Reports.jl") include("HTML.jl") include("end-to-end.jl") end