forked from ocaml/ocaml.org
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[scrape.yml] New OCaml Planet blog posts and videos from watch.ocaml.org
- Loading branch information
1 parent
8b3e85d
commit 1a230ea
Showing
3 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: OCaml Weekly News, 02 Jul 2024 | ||
description: | ||
url: https://alan.petitepomme.net/cwn/2024.07.02.html | ||
date: 2024-07-02T12:00:00-00:00 | ||
preview_image: | ||
authors: | ||
- Caml Weekly News | ||
source: | ||
--- | ||
|
||
<ol><li><a href="https://alan.petitepomme.net/cwn/2024.07.02.html#1">OCaml Tech Talk | Editor Features</a></li><li><a href="https://alan.petitepomme.net/cwn/2024.07.02.html#2">New release of Ocsipersist</a></li><li><a href="https://alan.petitepomme.net/cwn/2024.07.02.html#3">Preview of Godotcaml for the Godot 4.2 Game Engine</a></li><li><a href="https://alan.petitepomme.net/cwn/2024.07.02.html#4">euler 0.3</a></li><li><a href="https://alan.petitepomme.net/cwn/2024.07.02.html#5">dune 3.15</a></li><li><a href="https://alan.petitepomme.net/cwn/2024.07.02.html#6">dune 3.16</a></li><li><a href="https://alan.petitepomme.net/cwn/2024.07.02.html#7">Other OCaml News</a></li></ol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: OCaml Weekly News, 09 Jul 2024 | ||
description: | ||
url: https://alan.petitepomme.net/cwn/2024.07.09.html | ||
date: 2024-07-09T12:00:00-00:00 | ||
preview_image: | ||
authors: | ||
- Caml Weekly News | ||
source: | ||
--- | ||
|
||
<ol><li><a href="https://alan.petitepomme.net/cwn/2024.07.09.html#1">The Structure of Godotcaml as of Today, by Matt Walker [Fizzixnerd]</a></li><li><a href="https://alan.petitepomme.net/cwn/2024.07.09.html#2">opam 2.2.0 is out!</a></li><li><a href="https://alan.petitepomme.net/cwn/2024.07.09.html#3">OCaml.org Newsletter: June 2024</a></li><li><a href="https://alan.petitepomme.net/cwn/2024.07.09.html#4">ocaml-libbpf: Libbpf C-bindings for OCaml</a></li><li><a href="https://alan.petitepomme.net/cwn/2024.07.09.html#5">How I built the Acutis template language in OCaml</a></li><li><a href="https://alan.petitepomme.net/cwn/2024.07.09.html#6">MirageOS podcast</a></li></ol> |
60 changes: 60 additions & 0 deletions
60
data/planet/tarides/introducing-olly-providing-observability-tools-for-ocaml-5.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
title: 'Introducing Olly: Providing Observability Tools for OCaml 5' | ||
description: "It might be tempting to think that we can write code that works perfectly | ||
the first time around, but in reality optimisation and\u2026" | ||
url: https://tarides.com/blog/2024-07-03-introducing-olly-providing-observability-tools-for-ocaml-5 | ||
date: 2024-07-03T00:00:00-00:00 | ||
preview_image: https://tarides.com/static/c2d24e261cee0bd95269a23f88e01178/09efa/ollydata.jpg | ||
authors: | ||
- Tarides | ||
source: | ||
--- | ||
|
||
<p>It might be tempting to think that we can write code that works perfectly the first time around, but in reality optimisation and troubleshooting forms a big part of programming. However, there are more and less productive (and frustrating!) ways of problem solving. Having the right tools to guide you, ones that show you where to look and what is going wrong, can make a huge difference.</p> | ||
<p>We recently introduced you to the <a href="https://tarides.com/blog/2024-01-31-are-your-programs-doing-what-you-think-they-re-doing-introducing-monitoring-tools-for-multicore-ocaml/">monitoring system <code>runtime_events</code></a>, which allows users to monitor their runtime for, among other things, how programs are affecting performance. Alongside <code>runtime_events</code>, sits the observability tool <code>olly</code>, which provides users with a number of helpful formatting options for their runtime tracing data.</p> | ||
<p>This is all part of how we’re making developing in OCaml easier by bringing new features and tools to the community. Olly is just one such tool, and it makes the monitoring system for OCaml significantly more accessible. With Olly, you don’t have to be an expert or spend time combing through the data that <code>runtime_events</code> extracts for you. Rather, Olly can generate the information you need in a way that makes it easy to understand, store, and query.</p> | ||
<h2 style="position:relative;"><a href="https://tarides.com/feed.xml#what-is-olly-and-how-does-it-work" aria-label="what is olly and how does it work permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>What is Olly and How Does it Work?</h2> | ||
<p>Olly, as an observability tool for OCaml 5, has the ability to extract runtime tracing data from <code>runtime_events</code>. This data can then be visualised with a variety of graphical options available.</p> | ||
<p>How does Olly do this? Olly uses the Runtime API to provide you with monitoring metric information and associated data. The tool comes with several subcommands, each with its own function.</p> | ||
<p>The command <code>olly trace</code> can generate runtime traces for programs compiled in OCaml 5 using its trace subcommand. The tracing data is generated in one of two formats, the <a href="https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format">Fuschia trace format</a> or the <a href="https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview">Chrome tracing format</a> with the former being the default. Both formats can be viewed in <a href="https://ui.perfetto.dev">Perfetto</a>, but the Chrome format trace can also be viewed in <code>chrome://tracing</code> for Chromium-based browsers. Another example of a subcommand is <code>olly gc-stats</code>, which can report the running time of the garbage collector (GC) and the GC tail latency of an OCaml executable.</p> | ||
<p>The motivation behind introducing an observability tool like Olly is to make data extracted using <code>runtime_events</code> more useful, since few developers will want to use the event tracing system directly. Olly makes it easy for users to troubleshoot their own programs, but it also makes it easy for a developer to diagnose why someone <em>else’s</em> program is slow. A client can send their <code>runtime_events</code> data, a feature that comes built in with every OCaml 5 switch, to a developer who can then use Olly to find the problem and suggest a solution. This makes working in OCaml is easier as optimisation and problem solving becomes more efficient and streamlined.</p> | ||
<p>It doesn’t end there! One of our future goals for Olly is that it should be able to provide automatic reports and diagnosis of some problems. Look out for that exciting update in the future!</p> | ||
<h2 style="position:relative;"><a href="https://tarides.com/feed.xml#recent-update-modularising-olly" aria-label="recent update modularising olly permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Recent Update: Modularising Olly</h2> | ||
<p>One of the latest updates to Olly is its modularisation by <a href="https://github.com/eutro">Eutro</a>, splitting the <code>bin/olly.ml</code> file into smaller discrete libraries including <code>olly_common</code>, <code>olly_trace</code>, and <code>olly_gc_stats</code>. By splitting up the large file, the user can exercise some control over which dependencies they want their library to have. They can create a minimal build with minimal dependencies, or stick with a fuller build relying on all the dependencies. For example, to build <code>olly_bare</code> on the trunk you now only require two dependencies: Dune and <code>cmdliner</code>. Both can be installed without using Opam. Since some developers will prefer this set up, it’s good to support a variety of configurations.</p> | ||
<p>It also potentially makes it easier to maintain, since the smaller files have well-defined purposes and provide a clearer overview than just having one large file covering a multitude of functions. If something breaks, this segmentation can make it easier for a maintainer to triage and amend the problem. The same modularisation may also help newcomers get an overview of all the different components of the library. Sadiq Jaffer merged Eutro’s <a href="https://github.com/tarides/runtime_events_tools/pull/43">PR #43</a> into <code>Tarides: main</code> and it will form part of a future Olly release pending further testing.</p> | ||
<h2 style="position:relative;"><a href="https://tarides.com/feed.xml#how-to-use-olly-an-example" aria-label="how to use olly an example permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>How to Use Olly: an Example</h2> | ||
<p>Let's wrap up by looking at an example of when you might use Olly. When we want to visualise the performance of the OCaml runtime alongside any <a href="https://tarides.com/blog/2024-01-31-are-your-programs-doing-what-you-think-they-re-doing-introducing-monitoring-tools-for-multicore-ocaml/">custom events</a> we may have, the first step is to generate a trace. To generate a trace, we run the command <code>olly trace tracefile.trace</code> in combination with the name of the program we want to enable tracing for. If we wanted to generate a trace for the <code>solver-service</code>, the command would be <code>olly trace tracefile.trace 'solver-service'</code>.</p> | ||
<p>For our example, we chose to generate the tracing data in the Fuschia trace format. Once we had the trace, we loaded it into Perfetto to get a helpful visual representation of what our code is doing and we ended up with the following image:</p> | ||
<p><span class="gatsby-resp-image-wrapper" style="position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 680px; "> | ||
<a href="https://tarides.com/static/a6f36a136572efd644c7221f449795f5/89557/olly-trace-2.png" class="gatsby-resp-image-link" style="display: block" target="_blank" rel="noopener"> | ||
<span class="gatsby-resp-image-background-image" style="padding-bottom: 57.05882352941176%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAYAAAB/Ca1DAAAACXBIWXMAAAsTAAALEwEAmpwYAAABjUlEQVR42s1Sy2obQRDc/ydf4IsPORhCIHdfcgnBOMYotoLAr8iSHcXanZ13z0O7KvfMktiE3HJJQ1G11UzTj22E6EFEcM4hMMeUYJyBCwaULLNm1gi5eAoxO+TRI+0c0uDhooRyLbRvYb1CE0LE6xjHESuxxU3f4v3iEu8uv+Jwdoa3F+c4OD3Bh8UcR/MZ+7OqD89PcfDlM958PMan2ys0XddhHAbs9/uKUrCXhrvMeNgGXC0lrtcGyw1hft1htXFYP0XcrhTuf1jcPXosvkt8uxHoZERzt37AtpcwFCq0JyhbRg08PiGkMh7rHJCyr/zLD5nY4zWxn4eiueCGd/gkFUxMsClX1pGYCdJr9E4xZGVhe/bM5HGuaGFFRau3sMGieewEfpYOXxVUnjulCGk8pPZQlR2vwk5aucm3NGlG3/PR+F3TSl1HpbxD2A0gRuBLl2sHvjzx+MGYCUpWr/qFvQdpXXMkBDJ5NJ53VqIc5HcUXTFOGIcJw678Bi/+nzn+bjz9peA/xP9f8Bmp0lCTH8iGuwAAAABJRU5ErkJggg=='); background-size: cover; display: block;"></span> | ||
<img src="https://tarides.com/static/a6f36a136572efd644c7221f449795f5/c5bb3/olly-trace-2.png" class="gatsby-resp-image-image" alt="A diagram representing different processes running left to right along the image in different colours: green, yellow, pink, and grey. The visual representations of the processes are stacked on top of one another, forming different bands." title="" srcset="/static/a6f36a136572efd644c7221f449795f5/04472/olly-trace-2.png 170w, | ||
/static/a6f36a136572efd644c7221f449795f5/9f933/olly-trace-2.png 340w, | ||
/static/a6f36a136572efd644c7221f449795f5/c5bb3/olly-trace-2.png 680w, | ||
/static/a6f36a136572efd644c7221f449795f5/b12f7/olly-trace-2.png 1020w, | ||
/static/a6f36a136572efd644c7221f449795f5/b5a09/olly-trace-2.png 1360w, | ||
/static/a6f36a136572efd644c7221f449795f5/89557/olly-trace-2.png 1928w" sizes="(max-width: 680px) 100vw, 680px" style="width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;" loading="lazy" decoding="async"/> | ||
</a> | ||
</span></p> | ||
<p>The UI in this image displays the processes down the side, each corresponding to a domain. Our program ended up using four cores, and therefore, the image shows four processes. Each process, in turn, shows the tracing for the OCaml runtime build plus the custom events generated by Eio. Let's zoom in on one process now:</p> | ||
<p><span class="gatsby-resp-image-wrapper" style="position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 680px; "> | ||
<a href="https://tarides.com/static/80db9e97b3d228aeaadd165ec03845b8/ec09f/olly-expanded-2.png" class="gatsby-resp-image-link" style="display: block" target="_blank" rel="noopener"> | ||
<span class="gatsby-resp-image-background-image" style="padding-bottom: 50%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAYAAAC0VX7mAAAACXBIWXMAAAsTAAALEwEAmpwYAAACFUlEQVR42m2Ry08TURTG5w90ryhxbaILaIOJazewwIXRBSEuFI1GjFBKeQRK0AStbVHeKLQVAqECnc6jnWHeP8/MACtu8st3vu/czJl7rxKEIb7vX+O6Lkdqk7p6QrGxxUJtg/zvnxT2fjG5U2GxviVsMr+/zlJjW3pVcrsVxqpLlA52UaIoBCKuVigDTNuh44Vs/uvyo9FipaFSPTZZ3D5h9UhjQ/LygcrasU7pUOPr3ikz64fUzgyUkVdvePv+E2OXvH73kbEP44znppicnuHzVJ6c6FRhlsn8NBNCrpDmE/kC+Zk52VdgQvxKqYwyOPyC4ecjDD17mTAoPH74lMz9J/T3Zsjc6SfbE9NHVuqB3izZexn6bou/m5Gsj4GeLI9uPWB0aBSFG9ZKaYPc7Be+F/9QXqhRiSnuU53fZ235L6vLdb7NiS/WWS02qMw3KBVqHG6do8R3FhMEQYLnuew2z9hpqqi6j9kNMMxANMQQYu0kmmamFaHHPSvEcSMUw76QwML2gwTL83HktQN5rIvAl8zFDjypPam9pI6xJE/6Se4mPUe8cqYbNNU2puslGI6LZl2gdW1UzRBMWqKttsF5S5PaRG2nvq13aKl6kp+eqnKSjvyhZaF1OjLBT7A8mS4ftR0Hu9vFjnuGiS2bLU1PvWDFGp/MMLBiVBVH/I2PQhSlyN2mBCnBpUbBdS+6yuS4sf4HR+bJLu9BhM8AAAAASUVORK5CYII='); background-size: cover; display: block;"></span> | ||
<img src="https://tarides.com/static/80db9e97b3d228aeaadd165ec03845b8/c5bb3/olly-expanded-2.png" class="gatsby-resp-image-image" alt="A diagram giving an expanded view of the events happening in process 0. The different activities are shown using various colours. Activities include ring_id 0 1, eio.exit_fiber:v:5, and eio_fiber:v:1" title="" srcset="/static/80db9e97b3d228aeaadd165ec03845b8/04472/olly-expanded-2.png 170w, | ||
/static/80db9e97b3d228aeaadd165ec03845b8/9f933/olly-expanded-2.png 340w, | ||
/static/80db9e97b3d228aeaadd165ec03845b8/c5bb3/olly-expanded-2.png 680w, | ||
/static/80db9e97b3d228aeaadd165ec03845b8/b12f7/olly-expanded-2.png 1020w, | ||
/static/80db9e97b3d228aeaadd165ec03845b8/b5a09/olly-expanded-2.png 1360w, | ||
/static/80db9e97b3d228aeaadd165ec03845b8/ec09f/olly-expanded-2.png 1916w" sizes="(max-width: 680px) 100vw, 680px" style="width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;" loading="lazy" decoding="async"/> | ||
</a> | ||
</span></p> | ||
<p>This expanded view shows both the Garbage Collector's (GC) activity and times when Eio is suspended.</p> | ||
<h2 style="position:relative;"><a href="https://tarides.com/feed.xml#until-next-time" aria-label="until next time permalink" class="anchor before"><svg aria-hidden="true" focusable="false" height="16" version="1.1" viewbox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Until Next Time!</h2> | ||
<p>We want to create tools that make the developer experience in OCaml easier and more intuitive. Olly makes it possible to visualise your code's performance, helping you understand when your programs are slowing down and why. If you have suggestions or improvements to share, you are welcome to participate in <a href="https://github.com/tarides/runtime_events_tools">the Runtime Events Tools repo</a> on GitHub.</p> | ||
<p>We want to hear from you! Connect with us on social media by following us on <a href="https://x.com/tarides_">X</a> (formerly known as Twitter) and <a href="https://www.linkedin.com/company/tarides/">LinkedIn</a>. You can also join in with the rest of the community on the forum <a href="https://discuss.ocaml.org/">Discuss</a> to share your thoughts on everything OCaml!</p> | ||
<blockquote> | ||
<p>Tarides champions open-source development. We create and maintain key features of the OCaml language in collaboration with the OCaml community. To learn more about how you can support our open-source work, discover our <a href="https://github.com/sponsors/tarides">page on GitHub</a>.</p> | ||
</blockquote> | ||
<blockquote> | ||
<p>We are always happy to discuss commercial opportunities around OCaml. We provide core services, including training, tailor-made tools, and secure solutions. <a href="https://tarides.com/contact/">Contact us today</a> to learn more about how Tarides can help your teams realise their vision.</p> | ||
</blockquote> |