Skip to content

Commit 137591d

Browse files
authored
Merge pull request #443 from pythonspeed/420-sciagraph
Advertise sciagraph a bit more, and nicer report layout
2 parents 342fe78 + baa34f1 commit 137591d

File tree

4 files changed

+28
-31
lines changed

4 files changed

+28
-31
lines changed

Cargo.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/theme/fonts.css

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ tt {
2121
font-weight: 400;
2222
font-display: swap;
2323
src: url('https://pythonspeed.com/public/fonts/rosario-v13-latin-regular.eot'); /* IE9 Compat Modes */
24-
src: local('Rosario'), local('Rosario-Regular'),
25-
url('https://pythonspeed.com/public/fonts/rosario-v13-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
24+
src: url('https://pythonspeed.com/public/fonts/rosario-v13-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
2625
url('https://pythonspeed.com/public/fonts/rosario-v13-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
2726
url('https://pythonspeed.com/public/fonts/rosario-v13-latin-regular.woff') format('woff'), /* Modern Browsers */
2827
url('https://pythonspeed.com/public/fonts/rosario-v13-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
@@ -36,8 +35,7 @@ tt {
3635
font-weight: 400;
3736
font-display: swap;
3837
src: url('https://pythonspeed.com/public/fonts/rosario-v13-latin-italic.eot'); /* IE9 Compat Modes */
39-
src: local('Rosario Italic'), local('Rosario-Italic'),
40-
url('https://pythonspeed.com/public/fonts/rosario-v13-latin-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
38+
src: url('https://pythonspeed.com/public/fonts/rosario-v13-latin-italic.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
4139
url('https://pythonspeed.com/public/fonts/rosario-v13-latin-italic.woff2') format('woff2'), /* Super Modern Browsers */
4240
url('https://pythonspeed.com/public/fonts/rosario-v13-latin-italic.woff') format('woff'), /* Modern Browsers */
4341
url('https://pythonspeed.com/public/fonts/rosario-v13-latin-italic.ttf') format('truetype'), /* Safari, Android, iOS */
@@ -60,8 +58,7 @@ tt {
6058
font-weight: 700;
6159
font-display: swap;
6260
src: url('https://pythonspeed.com/public/fonts/rosario-v13-latin-700.eot'); /* IE9 Compat Modes */
63-
src: local('Rosario Bold'), local('Rosario-Bold'),
64-
url('https://pythonspeed.com/public/fonts/rosario-v13-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
61+
src: url('https://pythonspeed.com/public/fonts/rosario-v13-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
6562
url('https://pythonspeed.com/public/fonts/rosario-v13-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
6663
url('https://pythonspeed.com/public/fonts/rosario-v13-latin-700.woff') format('woff'), /* Modern Browsers */
6764
url('https://pythonspeed.com/public/fonts/rosario-v13-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
@@ -74,8 +71,7 @@ tt {
7471
font-style: normal;
7572
font-display: swap;
7673
font-weight: 400;
77-
src: local('Ubuntu Mono'), local('UbuntuMono-Regular'),
78-
url('https://pythonspeed.com/public/fonts/ubuntu-mono-v8-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
74+
src: url('https://pythonspeed.com/public/fonts/ubuntu-mono-v8-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
7975
url('https://pythonspeed.com/public/fonts/ubuntu-mono-v8-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
8076
}
8177

@@ -85,7 +81,6 @@ tt {
8581
font-style: normal;
8682
font-display: swap;
8783
font-weight: 700;
88-
src: local('Ubuntu Mono Bold'), local('UbuntuMono-Bold'),
89-
url('https://pythonspeed.com/public/fonts/ubuntu-mono-v8-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
84+
src: url('https://pythonspeed.com/public/fonts/ubuntu-mono-v8-latin-700.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
9085
url('https://pythonspeed.com/public/fonts/ubuntu-mono-v8-latin-700.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
9186
}

filprofiler/_report.py

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ def render_report(output_path: str, now: datetime) -> str:
3636
body {{
3737
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
3838
line-height: 1.2;
39-
max-width: 40rem;
39+
max-width: 90%;
4040
margin: 4rem auto;
4141
font-size: 18px;
4242
}}
43-
blockquote {{ border-width: 1px; border-color: black; border-style: solid; padding: 1em; }}
44-
div {{
45-
text-align: center;
43+
.center {{
44+
max-width: 40rem;
45+
margin: 0 auto;
4646
}}
47+
blockquote {{ border-width: 1px; border-color: black; border-style: solid; padding: 1em; }}
4748
</style>
4849
<script>
4950
function compatRequestFullscreen(elem) {{
@@ -74,29 +75,31 @@ def render_report(output_path: str, now: datetime) -> str:
7475
<p><code>{argv}</code><p>
7576
7677
<h2>Profiling result</h2>
77-
<div><p><input type="button" onclick="fullScreen('#peak');" value="Full screen"> · <a href="peak-memory.svg" target="_blank"><button>Open in new window</button></a></p>
78+
<div style="text-align: center;"><p><input type="button" onclick="fullScreen('#peak');" value="Full screen"> · <a href="peak-memory.svg" target="_blank"><button>Open in new window</button></a></p>
7879
<iframe id="peak" src="peak-memory.svg" width="100%" height="400" scrolling="auto" frameborder="0"></iframe><br>
7980
</div>
81+
<blockquote class="center">
82+
<p style="text-align: center;"><em>Check out my other project:</em></p>
83+
<h3>Find memory and performance bottlenecks in production!</h3>
84+
<p>When your data pipeline is too slow in production, reproducing the problem
85+
on your laptop is hard or impossible—which means identifying and fixing the problem can be tricky.</p>
86+
<p>What if you knew the cause of the problem as soon as you realized it was happening?</p>
87+
<p>That's why you need
88+
<strong><a href="https://sciagraph.com/">the Sciagraph profiler</a></strong>, designed to <strong>find performance
89+
and memory bottlenecks by continuously profiling in production.</strong></p></blockquote>
8090
<br>
81-
<br>
82-
<hr>
83-
<br>
84-
<div><p><input type="button" onclick="fullScreen('#peak-reversed');" value="Full screen"> · <a href="peak-memory-reversed.svg" target="_blank"><button>Open in new window</button></a></p>
91+
<br>
92+
<div style="text-align: center;"><p><input type="button" onclick="fullScreen('#peak-reversed');" value="Full screen"> ·
93+
<a href="peak-memory-reversed.svg" target="_blank"><button>Open in new window</button></a></p>
8594
<iframe id="peak-reversed" src="peak-memory-reversed.svg" width="100%" height="400" scrolling="auto" frameborder="0"></iframe><br>
8695
</div>
87-
<br>
96+
<div class="center">
8897
<blockquote><strong>Need help, or does something look wrong?</strong>
8998
<a href="https://pythonspeed.com/fil/docs/">Read the documentation</a>,
9099
and if that doesn't help please
91100
<a href="https://github.com/pythonspeed/filprofiler/issues/new?body={bugreport}">file an issue</a>
92101
and I'll try to help.</blockquote>
93102
<br>
94-
<blockquote><strong>Want memory and performance profiling for your production batch jobs?</strong>
95-
I've also created an
96-
<a href="https://pythonspeed.com/sciagraph/"
97-
>always-on profiler called Sciagraph</a> that is fast and robust enough to run in production.</blockquote>
98-
<br>
99-
100103
<h2>Learn how to reduce memory usage</h2>
101104
102105
<p>Need help reducing your data processing application's memory use? Check out tips and tricks <a href="https://pythonspeed.com/memory/">here</a>.</p>
@@ -133,7 +136,7 @@ def render_report(output_path: str, now: datetime) -> str:
133136
</ul>
134137
135138
<p>See <a href="https://pythonspeed.com/articles/measuring-memory-python/">this article</a> for more details.</p>
136-
139+
</div>
137140
</body>
138141
</html>
139142
""".format(

memapi/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ libloading = "0.7"
1919
libc = "0.2"
2020

2121
[dependencies.inferno]
22-
# Temporary fork until https://github.com/jonhoo/inferno/pull/262 is merged.
23-
git = "https://github.com/itamarst/inferno.git"
24-
branch = "monospace-fonts"
22+
version = "0.11"
2523
default-features = false
2624

2725
[dependencies.psutil]

0 commit comments

Comments
 (0)