|
| 1 | +using DaggerWebDash |
| 2 | +using TimespanLogging |
| 3 | +using Dagger |
| 4 | +using Test |
| 5 | + |
| 6 | +@testset "Basics" begin |
| 7 | + ml = TimespanLogging.MultiEventLog() |
| 8 | + ml[:core] = TimespanLogging.Events.CoreMetrics() |
| 9 | + ml[:id] = TimespanLogging.Events.IDMetrics() |
| 10 | + #profile && (ml[:profile] = DaggerWebDash.ProfileMetrics()) |
| 11 | + ml[:wsat] = TimespanLogging.Events.WorkerSaturation() |
| 12 | + ml[:loadavg] = TimespanLogging.Events.CPULoadAverages() |
| 13 | + ml[:bytes] = Dagger.Events.BytesAllocd() |
| 14 | + ml[:mem] = TimespanLogging.Events.MemoryFree() |
| 15 | + ml[:esat] = TimespanLogging.Events.EventSaturation() |
| 16 | + ml[:psat] = Dagger.Events.ProcessorSaturation() |
| 17 | + lw = TimespanLogging.Events.LogWindow(5*10^9, :core) |
| 18 | + # FIXME: logs_df = DataFrame([key=>[] for key in keys(ml.consumers)]...) |
| 19 | + # ts = DaggerWebDash.TableStorage(logs_df) |
| 20 | + # push!(lw.creation_handlers, ts) |
| 21 | + if render == "webdash" |
| 22 | + d3r = DaggerWebDash.D3Renderer(8080) #; seek_store=ts) |
| 23 | + push!(lw.creation_handlers, d3r) |
| 24 | + push!(lw.deletion_handlers, d3r) |
| 25 | + push!(d3r, GanttPlot(:core, :id, :timeline, :esat, :psat, "Overview")) |
| 26 | + # TODO: push!(d3r, ProfileViewer(:core, :profile, "Profile Viewer")) |
| 27 | + push!(d3r, LinePlot(:core, :wsat, "Worker Saturation", "Running Tasks")) |
| 28 | + push!(d3r, LinePlot(:core, :loadavg, "CPU Load Average", "Average Running Threads")) |
| 29 | + push!(d3r, LinePlot(:core, :bytes, "Allocated Bytes", "Bytes")) |
| 30 | + push!(d3r, LinePlot(:core, :mem, "Available Memory", "% Free")) |
| 31 | + #push!(d3r, GraphPlot(:core, :id, :timeline, :profile, "DAG")) |
| 32 | + ml.aggregators[:d3r] = d3r |
| 33 | + end |
| 34 | + ml.aggregators[:logwindow] = lw |
| 35 | + ctx = Context(; log_sink=ml) |
| 36 | + A = rand(Blocks(4, 4), 16, 16) |
| 37 | + @async collect(A * A) |
| 38 | + run(pipeline(`curl -s localhost:8080/index.html`; stdout=devnull)) |
| 39 | +end |
0 commit comments