Skip to content

Thresholds C#/F# check func should be printed in HTML Report #777

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

Closed
AntyaDev opened this issue Feb 3, 2025 · 7 comments
Closed

Thresholds C#/F# check func should be printed in HTML Report #777

AntyaDev opened this issue Feb 3, 2025 · 7 comments
Labels
Milestone

Comments

@AntyaDev
Copy link
Contributor

AntyaDev commented Feb 3, 2025

No description provided.

@AntyaDev AntyaDev added the 6.0.1 label Feb 3, 2025
@AntyaDev AntyaDev changed the title Thresholds C#/F# API should accept text message to be printed Thresholds C#/F# API should accept text message to be printed in report Feb 3, 2025
@JeffMountjoyStringham-assent
Copy link
Contributor

For clarity, would this text message be displayed for the "check expression" in the Thresholds tab of the HTML report?

Image

@AntyaDev
Copy link
Contributor Author

AntyaDev commented Feb 5, 2025

Yes, but with some details :)

Currently, when you configure a Threshold via JSON, you specify a "check expression," and we simply display it in the HTML report.
However, this approach doesn't work when defining the Threshold via code. We would like to modify the check expression to accept a lambda expression and attempt to print its body, or alternatively, if it does not work, allow a text argument that can be displayed in the HTML report. Ideally, we would prefer not to make any changes and instead find a way to print the body of the lambda expression as it is.

@JeffMountjoyStringham-assent
Copy link
Contributor

Thanks @AntyaDev that's exactly what we were hoping for when we saw this issue raised

@AntyaDev AntyaDev changed the title Thresholds C#/F# API should accept text message to be printed in report Thresholds C#/F# check func should be printed in HTML Report Feb 6, 2025
@AntyaDev
Copy link
Contributor Author

AntyaDev commented Feb 6, 2025

Added to 5.9.0-beta-4

@JeffMountjoyStringham-assent Could you please try?

@AntyaDev AntyaDev added this to the 5.9.0 milestone Feb 6, 2025
@AntyaDev AntyaDev closed this as completed Feb 6, 2025
@JeffMountjoyStringham-assent
Copy link
Contributor

This worked for me using 5.9.0-beta-4. With the thresholds configured in code, the information shown in the HTML report is what we were hoping to be able to see. Thanks for actioning this so quickly!

Image

@JeffMountjoyStringham-assent
Copy link
Contributor

I have an enhancement request for this feature. When the lambda expression contains a variable, the name of the variable is printed rather than the value. Would it be feasible to replace variable names with numeric values where it makes sense? I could raise this as a separate issue if preferred. In this example, it would be nice to have 200 displayed instead of targetPercent95InMillis

Image

@AntyaDev
Copy link
Contributor Author

Hi @JeffMountjoyStringham-assent
We process the lambda's body at compile time, so the runtime value is not available at that moment.

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

No branches or pull requests

2 participants