Skip to content

Sprintf-notif triggers for Sparta reports - #690

Merged
colby-nyce merged 11 commits into
masterfrom
colby-nyce/notif-source-reports
Oct 1, 2026
Merged

colby-nyce merged 11 commits into
masterfrom
colby-nyce/notif-source-reports

Conversation

@colby-nyce

@colby-nyce colby-nyce commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

This feature allows the use of sprintf-style ReportDescriptor.dest_file in yaml files:

content:
    report:
        pattern:   _global
        def_file:  simple_stats.yaml
        dest_file: "%s_%i.json"
        format:    json_reduced
        trigger:
            sprintf-notif: top.cpu.core0.rob.sprintf_notif

Which can be driven by the SprintfNotificationSource class:

// Results in report "foo_4.json" being written immediately
sprintf_notif->postNotification("foo", 4);

We only support %s and %i in the format strings.

The existing SimDB reports schema is not well-suited for these yaml dest_file's. I'd like to split up this task and come back to sprintf-notif triggers for SimDB to keep this PR focused (and SimDB reports are not enabled by default yet). The MAP issue for that is here:

#689

This comment was marked as resolved.

cnyce and others added 4 commits September 29, 2026 13:24
Remove assertion for format string in setUsesSprintfNotifTrigger

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: colby-nyce <176335162+colby-nyce@users.noreply.github.com>

@klingaard klingaard left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very powerful!

@colby-nyce
colby-nyce merged commit ba758c2 into master Oct 1, 2026
5 checks passed
@colby-nyce
colby-nyce deleted the colby-nyce/notif-source-reports branch October 1, 2026 17:19
github-actions Bot pushed a commit that referenced this pull request Oct 1, 2026
This feature allows the use of sprintf-style
`ReportDescriptor.dest_file` in yaml files:

```
content:
    report:
        pattern:   _global
        def_file:  simple_stats.yaml
        dest_file: "%s_%i.json"
        format:    json_reduced
        trigger:
            sprintf-notif: top.cpu.core0.rob.sprintf_notif
```

Which can be driven by the SprintfNotificationSource class:

```
// Results in report "foo_4.json" being written immediately
sprintf_notif->postNotification("foo", 4);
```

We only support `%s` and `%i` in the format strings.

The existing SimDB reports schema is not well-suited for these yaml
dest_file's. I'd like to split up this task and come back to
sprintf-notif triggers for SimDB to keep this PR focused (and SimDB
reports are not enabled by default yet). The MAP issue for that is here:

#689

---------

Co-authored-by: Colby Nyce <colby.steele.nyce@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: colby-nyce <176335162+colby-nyce@users.noreply.github.com> ba758c2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants