Blowhole version 5 now writes Signposts from the command line

You will recall that at WWDC this year, Apple announced a new tool in Mojave for developers: the Signpost. For those using Xcode 10 with a suitably supported language, you can now write special messages to the unified log which are intended for performance measurement, tuning, and debugging.

Apple didn’t, though, mention any access to Signposts from other languages and scripting systems, including AppleScript. This new version of my command tool Blowhole should fill this gap.

Since its first release, Blowhole has enabled those using scripting languages and regular shell scripts to write to the unified log. With a simple command such as
blowhole -d "Error: the argument doesn't parse."
any tool or app with access to commands can write arbitrary strings as messages in the log.

For Mojave, I have added three command options to write Signposts:

  • -B writes a .begin Signpost,
  • -E writes a .end, and
  • -V writes a .event.

Here’s an example session in Terminal:


All I have done in Consolation 3 is set the log extract to filter for the subsystem co.eclecticlight.blowhole, and used a style which displays the Signpost fields, which are only documented in Consolation 3 when running in Mojave:


Currently, a command such as
blowhole -B
works, but an error is posted in the message field of the log, consisting of
<compose failure [UUID]>
I don’t know whether that behaviour will change for the release version of Mojave.

If you use a command such as
blowhole -B "Test start"
instead, the string supplied is written into the message field, and a .begin Signpost is written with a system-supplied signpostID.

There is one significant limitation, when compared against full access to Signposts from a compiled Xcode app. Customisable Signpost features which have to persist within a process/app cannot be controlled. All these Signposts therefore have the same signpostID number (Signpost Identifier, OSSignpostID), name (blowhole), and scope. This might limit their access from Xcode Instruments, but Consolation 3 lets you export data in CSV format, making it easy to access timing data in a spreadsheet, for example.

Blowhole version 5 is compatible with Sierra, High Sierra, and Mojave, and is available from here: blowhole5
and from Downloads above.