Skip to content

Commit 237ce94

Browse files
authored
Merge pull request #47965 from makortel/patch-8
Fixes to `FWCore/Services` README's
2 parents e105610 + f7d409e commit 237ce94

File tree

3 files changed

+9
-17
lines changed

3 files changed

+9
-17
lines changed

FWCore/Services/scripts/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ The `edmTracerCompactLogViewer.py` is used to create a human understandable repr
77
To create a Tracer file, add the following to a cmsRun configuration
88
```python
99
process.add_(cms.Service("Tracer",
10-
useMessageLogger=cms.untracked.bool(False)),
11-
fileName=cms.untracked.string("<name of file>"))
10+
useMessageLogger=cms.untracked.bool(False),
11+
fileName=cms.untracked.string("<name of file>")))
1212
```
1313
Where `"<name of file>"` is whatever name you want to use for the file that will hold the Tracer output. The use of `useMessageLogger=cms.untracked.bool(False)` is optional but does
1414
help avoid creating a large output from cmsRun.
@@ -29,14 +29,11 @@ If you only want to see the framework transitions and not all the information ab
2929
Issue the shell command
3030
```edmTracerCompactLogViewer.py -w <name of file>```
3131

32-
The script will outut a new file named `data.js`.
32+
The script will output a new file named `data.json`.
3333

3434
If you only want to see the framework transitions and not all the information about ED or ES modules, you can use the option `-f`.
3535
You can also have all activities related to each module grouped by using the `-m` option.
3636

3737
#### setup web data
3838

39-
You will need to copy all the files in `$CMSSW_RELEASE_BASE/src/FWCore/Services/web` to a directory you can access from a web browser. Copy the `data.js` file
40-
created by `edmTracerCompactLogViewer.py` into that same web browser accessible directory. Now you can have your web browser access the `index.html` file.
41-
4239
For directions on how to use the web application, see the [`FWCore/Services/web/README.md`](../web/README.md) file.

FWCore/Services/web/README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
# Interactive Tracer Log Viewer
22

3-
## Starting the viewer
4-
5-
### standard web server
6-
If the output of `edmTracerCompactLogViewer.py` and the files from `FWCore/Services/web` have been placed in a directory accessible to a web server, you may just point your browser to the correct URL to run the viewer.
7-
8-
# My HTTP Server
9-
10-
This is a simple HTTP server implemented in Python using the `http.server` module.
3+
The viewer has a HTTP server component, implemented in Python using the `http.server` module, and a JavaScript client component.
114

125
## Usage
136

14-
1. Run the server script (`server.py`) using Python.
15-
2. Access the server in your web browser by navigating to `http://localhost:65432`.
7+
1. Copy the output of `edmTracerCompactLogViewer.py` and the files from `FWCore/Services/web` into a directory. The server lists all `.json` files in a drop-down list.
8+
2. Run the server script (`server.py`) using Python.
9+
3. Access the server in your web browser by navigating to `http://localhost:65432`.
1610

1711
### Specifying the Port
1812

1913
You can specify the port to serve on by using the `--port` argument:
2014

2115
```sh
2216
python server.py --port 8080
17+
```
2318

2419
## Viewer layout
2520
The viewer is composed to two main areas, the top is the timing viewer and at the bottom shows information about a selected time block. The top time viewer is further divided into three parts. On the left is the macro scoping grouping of framework activity types into Global and Stream activities. If the _module centric_ option was chosen then this area is also divided by each module activity which is sorted based on most time used to least time used. At the bottom is the measurement of time since the start of the job. The main area shows the blocks of time spend doing various work within the Framework.

FWCore/Services/web/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def do_GET(self):
1313
self.send_response(200)
1414
self.send_header('Content-type', 'application/json')
1515
self.end_headers()
16-
json_files = [f for f in os.listdir('.') if f.endswith('.json')]
16+
json_files = sorted([f for f in os.listdir('.') if f.endswith('.json')])
1717
self.wfile.write(json.dumps(json_files).encode())
1818
return
1919

0 commit comments

Comments
 (0)