Post

Replies

Boosts

Views

Activity

How to specify symbol/character in os-signpost-point-schema
I have a custom Xcode 13.2.1 (13C100) Instrument to which I have recently added os-signpost-point-schema. I notice that the events are marked with a hyphen/dash rather than a ⓢ. See the comparison of the signposts in my custom tool vs the standard “Points of Interest” tool: I have been digging through the documentation and while I am wagering that there is some simple attribute that can be set to dictate which symbol is included within the signpost circle, but it is not jumping out at me. How does one select the symbol used within custom event points in Instruments? FWIW, here is my Instrument: <?xml version="1.0" encoding="UTF-8" ?> <!-- Instruments Developer Help: https://help.apple.com/instruments/developer/mac/current/ --> <package> <id>com.robertmryan.CustomInterval</id> <version>0.2</version> <title>Custom Points of Interest</title> <owner> <name>Robert Ryan</name> </owner> <import-schema>os-signpost</import-schema> <!-- See https://help.apple.com/instruments/developer/mac/current/#/dev536412616 --> <os-signpost-point-schema> <id>custom-point-schema</id> <title>Points</title> <owner> <name>Robert Ryan</name> </owner> <purpose>Provide mechanism for multicolored events posted by `os_signpost`; The string generated by `os_signpost` must be in form of "Label:%d,Concept:%{public}@", where "Label" is string that will control what text appears in the event, and "Concept" is one of the strings listed in https://help.apple.com/instruments/developer/mac/current/#/dev66257045 that dictates the color of the interval. No spaces after the commas within this string.</purpose> <note>That message must use that printf-style format, not embedding the values in the format string literal.</note> <!-- you can constrain this to a particular subsystem if you'd like: <subsystem>"com.domain.MyApp"</subsystem> --> <category>"Interval"</category> <name>?name</name> <pattern> <message>"Label:" ?label ",Concept:" ?concept</message> </pattern> <column> <mnemonic>name</mnemonic> <title>Name</title> <type>string</type> <expression>?name</expression> </column> <column> <mnemonic>label</mnemonic> <title>Label</title> <type>string</type> <expression>?label</expression> </column> <column> <mnemonic>concept</mnemonic> <title>Concept</title> <type>event-concept</type> <expression>?concept</expression> </column> </os-signpost-point-schema> <os-signpost-interval-schema> <id>custom-interval-schema</id> <title>Intervals</title> <owner> <name>Robert Ryan</name> </owner> <purpose>Provide mechanism for multicolored intervals posted by `os_signpost`; The string generated by `os_signpost` must be in form of "Label:%d,Concept:%{public}@", where "Label" is string that will control what text appears in the interval, and "Concept" is one of the strings listed in https://help.apple.com/instruments/developer/mac/current/#/dev66257045 that dictates the color of the interval. No spaces after the commas within this string.</purpose> <note>That message must use that printf-style format, not embedding the values in the format string literal.</note> <!-- you can constrain this to a particular subsystem if you'd like: <subsystem>"com.domain.MyApp"</subsystem> --> <category>"Interval"</category> <name>?name</name> <start-pattern> <message>"Label:" ?label ",Concept:" ?concept</message> </start-pattern> <column> <mnemonic>name</mnemonic> <title>Name</title> <type>string</type> <expression>?name</expression> </column> <column> <mnemonic>label</mnemonic> <title>Label</title> <type>string</type> <expression>?label</expression> </column> <column> <mnemonic>concept</mnemonic> <title>Concept</title> <type>event-concept</type> <expression>?concept</expression> </column> </os-signpost-interval-schema> <instrument> <id>com.robertmryan.CustomInterval.instrument</id> <title>Custom Points of Interest</title> <category>Behavior</category> <purpose>Provide multi-colored intervals as dictated by the "event-concept" parsed from the `start-pattern` string.</purpose> <icon>Points of Interest</icon> <limitations></limitations> <create-table> <id>custom-interval-table</id> <schema-ref>custom-interval-schema</schema-ref> </create-table> <create-table> <id>custom-point-table</id> <schema-ref>custom-point-schema</schema-ref> </create-table> <graph> <title>Custom Interval Graph</title> <lane> <title>Points</title> <table-ref>custom-point-table</table-ref> <plot-template> <instance-by>name</instance-by> <label-format>%s</label-format> <value-from>name</value-from> <color-from>concept</color-from> <label-from>label</label-from> </plot-template> </lane> <lane> <title>Intervals</title> <table-ref>custom-interval-table</table-ref> <plot-template> <instance-by>name</instance-by> <label-format>%s</label-format> <value-from>name</value-from> <color-from>concept</color-from> <label-from>label</label-from> <qualified-by>layout-qualifier</qualified-by> </plot-template> </lane> </graph> <list> <title>Custom Regions of Interest</title> <table-ref>custom-interval-table</table-ref> <column>name</column> <column>label</column> <column>concept</column> <column>start</column> <column>duration</column> </list> <list> <title>Custom Points of Interest</title> <table-ref>custom-point-table</table-ref> <column>name</column> <column>label</column> <column>concept</column> </list> </instrument> </package>
1
1
771
Jan ’22
Points of Interest for iOS targets in Xcode 11.4 not working?
I use “Points of Interest” signposts and ranges all the time. But with Xcode 11.4, I’m no longer seeing signposts for my iOS targets. Is this a known issue?import os.log private let pointsOfInterest = OSLog(subsystem: "PointsOfInterestDemo", category: .pointsOfInterest) class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() os_signpost(.event, log: pointsOfInterest, name: "viewDidLoad") } @IBAction func didTapStartRange(_ sender: Any) { let id = OSSignpostID(log: pointsOfInterest) os_signpost(.begin, log: pointsOfInterest, name: "didTapStartRange", signpostID: id) DispatchQueue.main.asyncAfter(deadline: .now() + 3) { os_signpost(.end, log: pointsOfInterest, name: "didTapStartRange", signpostID: id) } os_log("didTapStartRange") } @IBAction func didTapSignpost(_ sender: Any) { os_signpost(.event, log: pointsOfInterest, name: #function) os_log("didTapSignpost") } }It works in Xcode 11.3.1 (11C505), but not Xcode 11.4 (11E146). And in Xcode 11.4, it works for macOS targets, but not iOS targets. I’m running Catalina 10.15.4 (19E266) on MacBook Pro (15-inch, 2018). I tried deferred recording, and 13.2 simulator target, all with no joy.
4
0
2.4k
Mar ’20