@@ -16,22 +16,24 @@ easiest way to get started with the web dashboard for new users.
16
16
For manual usage, the following snippet of code will suffice:
17
17
18
18
``` julia
19
+ using Dagger, DaggerWebDash, TimespanLogging
20
+
19
21
ctx = Context () # or `ctx = Dagger.Sch.eager_context()` for eager API usage
20
- ml = Dagger . MultiEventLog ()
22
+ ml = TimespanLogging . MultiEventLog ()
21
23
22
24
# # Add some logging events of interest
23
25
24
- ml[:core ] = Dagger . Events. CoreMetrics ()
25
- ml[:id ] = Dagger . Events. IDMetrics ()
26
- ml[:timeline ] = Dagger . Events. TimelineMetrics ()
26
+ ml[:core ] = TimespanLogging . Events. CoreMetrics ()
27
+ ml[:id ] = TimespanLogging . Events. IDMetrics ()
28
+ ml[:timeline ] = TimespanLogging . Events. TimelineMetrics ()
27
29
# ...
28
30
29
31
# (Optional) Enable profile flamegraph generation with ProfileSVG
30
32
ml[:profile ] = DaggerWebDash. ProfileMetrics ()
31
33
ctx. profile = true
32
34
33
35
# Create a LogWindow; necessary for real-time event updates
34
- lw = Dagger . Events. LogWindow (20 * 10 ^ 9 , :core )
36
+ lw = TimespanLogging . Events. LogWindow (20 * 10 ^ 9 , :core )
35
37
ml. aggregators[:logwindow ] = lw
36
38
37
39
# Create the D3Renderer server on port 8080
@@ -40,20 +42,20 @@ d3r = DaggerWebDash.D3Renderer(8080)
40
42
# # Add some plots! Rendered top-down in order
41
43
42
44
# Show an overview of all generated events as a Gantt chart
43
- push! (d3r, GanttPlot (:core , :id , :esat , :psat ; title= " Overview" ))
45
+ push! (d3r, DaggerWebDash . GanttPlot (:core , :id , :esat , :psat ; title= " Overview" ))
44
46
45
47
# Show various numerical events as line plots over time
46
- push! (d3r, LinePlot (:core , :wsat , " Worker Saturation" , " Running Tasks" ))
47
- push! (d3r, LinePlot (:core , :loadavg , " CPU Load Average" , " Average Running Threads" ))
48
- push! (d3r, LinePlot (:core , :bytes , " Allocated Bytes" , " Bytes" ))
49
- push! (d3r, LinePlot (:core , :mem , " Available Memory" , " % Free" ))
48
+ push! (d3r, DaggerWebDash . LinePlot (:core , :wsat , " Worker Saturation" , " Running Tasks" ))
49
+ push! (d3r, DaggerWebDash . LinePlot (:core , :loadavg , " CPU Load Average" , " Average Running Threads" ))
50
+ push! (d3r, DaggerWebDash . LinePlot (:core , :bytes , " Allocated Bytes" , " Bytes" ))
51
+ push! (d3r, DaggerWebDash . LinePlot (:core , :mem , " Available Memory" , " % Free" ))
50
52
51
53
# Show a graph rendering of compute tasks and data movement between them
52
54
# Note: Profile events are ignored if absent from the log
53
- push! (d3r, GraphPlot (:core , :id , :timeline , :profile , " DAG" ))
55
+ push! (d3r, DaggerWebDash . GraphPlot (:core , :id , :timeline , :profile , " DAG" ))
54
56
55
57
# TODO : Not yet functional
56
- # push!(d3r, ProfileViewer(:core, :profile, "Profile Viewer"))
58
+ # push!(d3r, DaggerWebDash. ProfileViewer(:core, :profile, "Profile Viewer"))
57
59
58
60
# Add the D3Renderer as a consumer of special events generated by LogWindow
59
61
push! (lw. creation_handlers, d3r)
0 commit comments