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

[webcanvas] Improving usability with stressGraphics tests #17072

Merged
merged 12 commits into from
Nov 27, 2024

Conversation

linev
Copy link
Member

@linev linev commented Nov 26, 2024

  1. Generate images in canv_batch.htm sequentially. Solves memory usage problem when running browsers in headless mode - from stressGraphics for instance. Handle exceptions to avoid hanging of headless browser. Report failures up to user output.
  2. Avoid gRandom usage in webdisplay classes. Instead - just create and use TRandom3 instance when necessary. Because of it stressGraphics in web mode was producing results which differ too much from each other
  3. Provide special mode in stressGraphics to analyze test results and generate reference table. Provide stressGraphics_web.ref file after testing on all platforms / all supported browsers.
  4. Several minor fixes in TWebCanvas to properly handle draw options for TGraph / TGraph2D
  5. Properly implement "cont5" draw option for TGraph2D in JSROOT
  6. Correctly place and display histogram title depending from gStyle->GetTitleAlign() value
  7. Correctly implement "same" draw option for histogram when no frame is exists - like in waves() tutorial
  8. Improve float to string conversion with g qualifier, makes stat box output similar to ROOT one
  9. Support different angle coordinates in TGraphPolar, support this class in TWebCanvas
  10. Fix text align in #splitline directive of TLatex
  11. Fix portrait / landscape problem in pdf generation with svg2pdf.js
  12. Many other small fixes in JSROOT

This option is now handled by TGraph2D and does not
require histogram filling
Also P and P0 uses real TGraph2D drawing
Check X+ or Y+ to create histogram
Let create TGraphPolargram when necessary
Provide access to polargram object
Avoid TFrame creation, create title
If gStyle->GetOptFit() returns 0, stats box for TGraph with TF1
will not be created
Process several drawings sequentially to avoid concurency and high
memory consumption.
If done sequentially - there is no ambiguity which gStyle instance
has to be used.
Catch JSROOT exceptions (if any) - process at least images which
can be created and mark missing images as failures
If failure happens during image production, report it
and try to create other images
If in web mode root or xml file is created do not print warning
When required, instantiate TRandom3 instance directly.
Try to avoid interference with other tests relying on gRandom
Use better C++ syntax in the code
Replace "samecolorz" by "samecolz" option in waves() test
Set fixed time offset in tgaxis3() to get reproducible axis labels
Let read several reference files generated by running
`stressGraphics -r`
And then find min/max for each test.
Define error as 1.5 of maximal deviation from mean value
To generate new reference file, call

./stressGraphics --build *.txt
1. Implement cont5 draw option for `TGraph2D` using Delaunay algorithm
1. Adjust histogram title drawing with native implementation
1. Improve float to string convertion when 'g' is specified
1. Support "same" option for first histogram, draw direcly on pad
1. Support different angle coordiantes in `TGraphPolargram`
1. Fix - handle `TPave` NDC position also when fInit is not set
1. Fix - correctly position title according to gStyle->GetTitleAlign()
1. Fix - correctly handle tooltip events for `TGraphPolar`
1. Fix - align in #splitline

Many other small changes to make stressGraphics output
 very-very similar to original graphics
Generated on base of tests on:
   - Linux chrome/firefox
   - MacOS chrome/firefox
   - Win64 chrome/firefox/edge

Produced with command:
```
./stressGraphics --web --build st*.txt > stressGraphics_web.ref
```
Copy link

Test Results

    17 files      17 suites   3d 22h 39m 29s ⏱️
 2 680 tests  2 679 ✅ 0 💤 1 ❌
43 782 runs  43 781 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 782871d.

@linev linev merged commit e502d65 into root-project:master Nov 27, 2024
17 of 21 checks passed
@linev linev deleted the webcanv_cont5 branch November 27, 2024 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants