Skip to content

Commit edebd86

Browse files
committed
add some comments
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 1400ab2 commit edebd86

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

options/locale/locale_en-US.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2960,28 +2960,36 @@ monitor.process.cancel_notices = Cancel: <strong>%s</strong>?
29602960
monitor.process.children = Children
29612961
29622962
monitor.pprof = PProf Profiles
2963+
monitor.pprof.description = PProf profiles provide runtime profiling data.
2964+
monitor.pprof.description_2 = Text formats can be read directly but most data is in the format expected by the golang pprof visualization tool
2965+
29632966
monitor.pprof.download = Download
29642967
monitor.pprof.duration = Duration
29652968
monitor.pprof.duration_placeholder = e.g. 30s
29662969
monitor.pprof.duration_invalid = Invalid duration - duration must be a golang duration string
29672970
29682971
monitor.pprof.cpuprofile = CPU Profile
2972+
monitor.pprof.cpuprofile.description = CPU profile determines where Gitea spends its time while actively consuming CPU cycles
29692973
29702974
monitor.pprof.fgprof = Full Go Profile
2975+
monitor.pprof.fgprof.description = Full Go profile provides wall clock profiling combining the CPU Profile with IO time
29712976
monitor.pprof.fgprof.format = Format
29722977
29732978
monitor.pprof.named_profiles = Named Profiles
2979+
monitor.pprof.named_profiles.description = Go provides a number of named profiles for other profiling
29742980
monitor.pprof.named_profiles.name = Name
29752981
monitor.pprof.named_profiles.debug = Format
29762982
monitor.pprof.named_profiles.format_pprof = pprof
29772983
monitor.pprof.named_profiles.format_text = text
29782984
monitor.pprof.named_profiles.format_goroutine = custom/goroutine
29792985
2986+
monitor.pprof.stacktrace.description = Stacktraces provides stacktraces for all current goroutines mapped with Gitea's internal processes
29802987
monitor.pprof.stacktrace.flat = Do not nest processes under their parents
29812988
monitor.pprof.stacktrace.no-system = Do not include go-routines associated with system processes
29822989
monitor.pprof.stacktrace.format = Format
29832990
29842991
monitor.pprof.trace = Trace
2992+
monitor.pprof.trace.description = Trace provides tracing that can be used by the go tracing tool
29852993
29862994
monitor.queues = Queues
29872995
monitor.queue = Queue: %s

templates/admin/pprof.tmpl

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22
{{.locale.Tr "admin.monitor.pprof"}}
33
</h4>
44
<div class="ui attached segment">
5+
<p>{{.locale.Tr "admin.monitor.pprof.description"}}</p>
6+
<p>{{.locale.Tr "admin.monitor.pprof.description_2"}}</p>
57
<h4>{{.locale.Tr "admin.monitor.pprof.cpuprofile"}}</h4>
68
<form action="{{AppSubUrl}}/admin/monitor/cpu-profile">
79
<div class="ui form">
10+
<div class="help">{{.locale.Tr "admin.monitor.pprof.cpuprofile.description"}}</div>
811
<div class="field">
912
<label for="pprof-cpuprofile-duration">{{.locale.Tr "admin.monitor.pprof.duration"}}</label>
1013
<input id="pprof-cpuprofile-duration" type="text" name="duration" placeholder="{{.locale.Tr "admin.monitor.pprof.duration_placeholder"}}">
@@ -15,6 +18,7 @@
1518
<h4>{{.locale.Tr "admin.monitor.pprof.fgprof"}}</h4>
1619
<form action="{{AppSubUrl}}/admin/monitor/fgprof">
1720
<div class="ui form">
21+
<div class="help">{{.locale.Tr "admin.monitor.pprof.fgprof.description"}}</div>
1822
<div class="field">
1923
<label for="pprof-fgprof-duration">{{.locale.Tr "admin.monitor.pprof.duration"}}</label>
2024
<input id="pprof-fgprof-duration" type="text" name="duration" placeholder="{{.locale.Tr "admin.monitor.pprof.duration_placeholder"}}">
@@ -32,6 +36,7 @@
3236
<h4>{{.locale.Tr "admin.monitor.stacktrace"}}</h4>
3337
<form action="{{AppSubUrl}}/admin/monitor/stacktrace-profile">
3438
<div class="ui form">
39+
<div class="help">{{.locale.Tr "admin.monitor.pprof.stacktrace.description"}}</div>
3540
<div class="inline field">
3641
<div class="ui checkbox">
3742
<input id="pprof-stacktrace-flat" type="checkbox" tabindex="0" class="hidden" name="flat">
@@ -54,19 +59,10 @@
5459
<input class="ui button basic" type="submit" value="{{.locale.Tr "admin.monitor.pprof.download"}}">
5560
</div>
5661
</form>
57-
<h4>{{.locale.Tr "admin.monitor.pprof.trace"}}</h4>
58-
<form action="{{AppSubUrl}}/admin/monitor/trace">
59-
<div class="ui form">
60-
<div class="field">
61-
<label for="pprof-trace-duration">{{.locale.Tr "admin.monitor.pprof.duration"}}</label>
62-
<input id="pprof-trace-duration" type="text" name="duration" placeholder="{{.locale.Tr "admin.monitor.pprof.duration_placeholder"}}">
63-
</div>
64-
<input class="ui button basic" type="submit" value="{{.locale.Tr "admin.monitor.pprof.download"}}">
65-
</div>
66-
</form>
6762
<h4>{{.locale.Tr "admin.monitor.pprof.named_profiles"}}</h4>
6863
<form action="{{AppSubUrl}}/admin/monitor/profile">
6964
<div class="ui form">
65+
<div class="help">{{.locale.Tr "admin.monitor.pprof.named_profiles.description"}}</div>
7066
<div class="field">
7167
<label for="pprof-named_profiles-name">{{.locale.Tr "admin.monitor.pprof.named_profiles.name"}}</label>
7268
<select class="ui search dropdown" id="pprof-named_profiles-name" name="name">
@@ -86,4 +82,15 @@
8682
<input class="ui button basic" type="submit" value="{{$.locale.Tr "admin.monitor.pprof.download"}}">
8783
</div>
8884
</form>
85+
<h4>{{.locale.Tr "admin.monitor.pprof.trace"}}</h4>
86+
<form action="{{AppSubUrl}}/admin/monitor/trace">
87+
<div class="help">{{.locale.Tr "admin.monitor.pprof.trace.description"}}</div>
88+
<div class="ui form">
89+
<div class="field">
90+
<label for="pprof-trace-duration">{{.locale.Tr "admin.monitor.pprof.duration"}}</label>
91+
<input id="pprof-trace-duration" type="text" name="duration" placeholder="{{.locale.Tr "admin.monitor.pprof.duration_placeholder"}}">
92+
</div>
93+
<input class="ui button basic" type="submit" value="{{.locale.Tr "admin.monitor.pprof.download"}}">
94+
</div>
95+
</form>
8996
</div>

0 commit comments

Comments
 (0)