Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(minor): Exporter specific configurations #286

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

CrownedPhoenix
Copy link
Contributor

@CrownedPhoenix CrownedPhoenix commented Oct 4, 2024

Description

A series of refactors that culminate in enabling exporter specific configurations to be provided at benchmark initialization.

This is intended to support a use case like the following.

for n in [10, 100, 1000] {
    let x = Double.random(in: 0.0...100.0)
    Benchmark("Foo", configuration: .init(
        tags: ["n": String(n), "x": String(x)],
        exportConfigurations: [
            .influx: InfluxExportConfiguration(
                fields: ["x": .double]
            )
        ]
    )) { _ in
        foo(n, x)
    }
}

This PR is more easily reviewed by commit.

How Has This Been Tested?

I manually tested the exporter csv against an instance of Influx using Influx Data Explorer and querying a raw csv.
I followed instructions listed here

Minimal checklist:

  • I have performed a self-review of my own code
  • I have added DocC code-level documentation for any public interfaces exported by the package
  • I have added unit and/or integration tests that prove my fix is effective or that my feature works

@CrownedPhoenix CrownedPhoenix force-pushed the feat(minor)/exporter-specific-configurations branch from b577a14 to c0e674d Compare October 4, 2024 20:30
@CrownedPhoenix CrownedPhoenix changed the title Feat(minor)/exporter specific configurations feat(minor)/exporter specific configurations Oct 4, 2024
@CrownedPhoenix CrownedPhoenix changed the title feat(minor)/exporter specific configurations feat(minor): Exporter specific configurations Oct 4, 2024
@CrownedPhoenix
Copy link
Contributor Author

Would like some feedback on how/whether we'd prefer to do unit and/or integration tests for this feature.

@CrownedPhoenix CrownedPhoenix marked this pull request as ready for review October 4, 2024 20:34
@CrownedPhoenix CrownedPhoenix force-pushed the feat(minor)/exporter-specific-configurations branch from c0e674d to c1ba1a2 Compare October 4, 2024 20:51
Jairon Terrero added 5 commits December 5, 2024 15:07
Groups BenchmarkBaseline results by "profile" - meaning an execution of a specific benchmark and its various results (for each execution).
This allows us to store information pertinent to the entire benchmark in one place rather than repeating it for each BenchmarkResult.
This allows us to forward information about the benchmark down to the exporters.
@CrownedPhoenix CrownedPhoenix force-pushed the feat(minor)/exporter-specific-configurations branch from 4bc0a5d to b354858 Compare December 5, 2024 22:07
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 9.75610% with 37 lines in your changes missing coverage. Please review.

Project coverage is 70.75%. Comparing base (51fffb6) to head (b354858).

Files with missing lines Patch % Lines
...tConfigurations/BenchmarkExportConfiguration.swift 8.11% 34 Missing ⚠️
...portConfigurations/InfluxExportConfiguration.swift 0.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #286      +/-   ##
==========================================
- Coverage   71.41%   70.75%   -0.66%     
==========================================
  Files          32       34       +2     
  Lines        3791     3832      +41     
==========================================
+ Hits         2707     2711       +4     
- Misses       1084     1121      +37     
Files with missing lines Coverage Δ
Sources/Benchmark/Benchmark.swift 70.91% <100.00%> (+0.18%) ⬆️
...portConfigurations/InfluxExportConfiguration.swift 0.00% <0.00%> (ø)
...tConfigurations/BenchmarkExportConfiguration.swift 8.11% <8.11%> (ø)
Files with missing lines Coverage Δ
Sources/Benchmark/Benchmark.swift 70.91% <100.00%> (+0.18%) ⬆️
...portConfigurations/InfluxExportConfiguration.swift 0.00% <0.00%> (ø)
...tConfigurations/BenchmarkExportConfiguration.swift 8.11% <8.11%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51fffb6...b354858. Read the comment docs.

@hassila
Copy link
Contributor

hassila commented Dec 7, 2024

Apologies for very late feedback, currently no bandwidth but will revert asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants