Debian Codegraph @

src/internal/trace/traceviewer/static/README.md

raw
1 ## Resources for Go's trace viewer
2
3 Go execution trace UI (`go tool trace`) embeds
4 Chrome's trace viewer (Catapult) following the
5 [instructions](
6 https://chromium.googlesource.com/catapult/+/refs/heads/master/tracing/docs/embedding-trace-viewer.md). This directory contains
7 the helper files to embed Chrome's trace viewer.
8
9 The current resources were generated/copied from
10 [`Catapult@9508452e18f130c98499cb4c4f1e1efaedee8962`](
11 https://chromium.googlesource.com/catapult/+/9508452e18f130c98499cb4c4f1e1efaedee8962).
12
13 ### Updating `trace_viewer_full.html`
14
15 The file was generated by catapult's `vulcanize_trace_viewer` command.
16
17 ```
18 $ git clone https://chromium.googlesource.com/catapult
19 $ cd catapult
20 $ ./tracing/bin/vulcanize_trace_viewer --config=full
21 $ cp tracing/bin/trace_viewer_full.html $GOROOT/src/cmd/trace/static/trace_viewer_full.html
22 ```
23
24 We are supposed to use --config=lean (produces smaller html),
25 but it is broken at the moment:
26 https://github.com/catapult-project/catapult/issues/2247
27
28 ### Updating `webcomponents.min.js`
29
30 `webcomponents.min.js` is necessary to let the trace viewer page
31 to import the `trace_viewer_full.html`.
32 This is copied from the catapult repo.
33
34 ```
35 $ cp third_party/polymer/components/webcomponentsjs/webcomponents.min.js $GOROOT/src/cmd/trace/static/webcomponents.min.js
36 ```
37
38 ## Licenses
39
40 The license for trace-viewer is as follows:
41 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
42 //
43 // Redistribution and use in source and binary forms, with or without
44 // modification, are permitted provided that the following conditions are
45 // met:
46 //
47 // * Redistributions of source code must retain the above copyright
48 // notice, this list of conditions and the following disclaimer.
49 // * Redistributions in binary form must reproduce the above
50 // copyright notice, this list of conditions and the following disclaimer
51 // in the documentation and/or other materials provided with the
52 // distribution.
53 // * Neither the name of Google Inc. nor the names of its
54 // contributors may be used to endorse or promote products derived from
55 // this software without specific prior written permission.
56 //
57 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
58 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
59 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
60 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
61 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
62 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
63 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
64 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
65 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
66 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
67 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
68
69 The license for webcomponents.min.js is as follows:
70
71 /**
72 * @license
73 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
74 * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
75 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
76 * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
77 * Code distributed by Google as part of the polymer project is also
78 * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
79 */
80 // Copyright (c) 2014 The Polymer Authors. All rights reserved.
81 //
82 // Redistribution and use in source and binary forms, with or without
83 // modification, are permitted provided that the following conditions are
84 // met:
85 //
86 // * Redistributions of source code must retain the above copyright
87 // notice, this list of conditions and the following disclaimer.
88 // * Redistributions in binary form must reproduce the above
89 // copyright notice, this list of conditions and the following disclaimer
90 // in the documentation and/or other materials provided with the
91 // distribution.
92 // * Neither the name of Google Inc. nor the names of its
93 // contributors may be used to endorse or promote products derived from
94 // this software without specific prior written permission.
95 //
96 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
97 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
98 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
99 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
100 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
101 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
102 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
103 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
104 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
105 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
106 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.