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

Log spring cleaning #6065

Merged
merged 12 commits into from
Jul 31, 2024
Merged

Log spring cleaning #6065

merged 12 commits into from
Jul 31, 2024

Conversation

nical
Copy link
Contributor

@nical nical commented Jul 31, 2024

Connections

#6046

Description

This PR removes a lot of trace and debug logging in code that tends to be exercised once for each frame in a typical application. Also demotes some logging from info to trace.

The motivation is to reduce the overall verbosity of our logs and shave off some of the overhead of checking the log levels when a log level is disabled at runtime, which is reportedly significant.

I have no doubt that some that logging we actually to want to keep so I invite every active wgpu maintainer to chime in and comment inline for each log they want to save.
The PR does not remove API logs, resource logs and the logging that happens during device initialization since it was already established that we want to keep them.

Checklist

  • Run cargo fmt.
  • Run cargo clippy.
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@nical nical requested a review from a team as a code owner July 31, 2024 06:43
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

looks (very) good to me! :) expect that there's no changelog entry ;-)
(I think it's important to highlight in releases that we're putting in this kind of love for the health of the codebase!)

Let's see what the other maintainers have to say

@ErichDonGubler

This comment was marked as resolved.

@nical
Copy link
Contributor Author

nical commented Jul 31, 2024

I only have linux hardware to test on. The d3d12 backend might get a more noticeable boost since it was a fair bit more verbose than the other backends. Anyway, here are the results of running the render pass bench on linux:

Renderpass: Single Threaded/1 renderpasses x 10000 draws (Renderpass Time)
                        time:   [25.071 ms 25.159 ms 25.254 ms]
                        thrpt:  [395.98 Kelem/s 397.47 Kelem/s 398.86 Kelem/s]
                 change:
                        time:   [-2.5815% -2.1068% -1.5924%] (p = 0.00 < 0.05)
                        thrpt:  [+1.6181% +2.1521% +2.6499%]
                        Performance has improved.
Renderpass: Single Threaded/2 renderpasses x 5000 draws (Renderpass Time)
                        time:   [28.258 ms 28.362 ms 28.471 ms]
                        thrpt:  [351.24 Kelem/s 352.58 Kelem/s 353.88 Kelem/s]
                 change:
                        time:   [+2.2233% +2.6025% +3.0071%] (p = 0.00 < 0.05)
                        thrpt:  [-2.9193% -2.5365% -2.1750%]
                        Performance has regressed.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) high mild
Renderpass: Single Threaded/4 renderpasses x 2500 draws (Renderpass Time)
                        time:   [28.169 ms 28.192 ms 28.220 ms]
                        thrpt:  [354.36 Kelem/s 354.71 Kelem/s 355.00 Kelem/s]
                 change:
                        time:   [-1.2771% -1.0068% -0.7523%] (p = 0.00 < 0.05)
                        thrpt:  [+0.7580% +1.0171% +1.2936%]
                        Change within noise threshold.
Found 3 outliers among 100 measurements (3.00%)
  1 (1.00%) high mild
  2 (2.00%) high severe
Renderpass: Single Threaded/8 renderpasses x 1250 draws (Renderpass Time)
                        time:   [28.388 ms 28.411 ms 28.433 ms]
                        thrpt:  [351.70 Kelem/s 351.98 Kelem/s 352.26 Kelem/s]
                 change:
                        time:   [-0.6806% -0.2753% +0.1216%] (p = 0.18 > 0.05)
                        thrpt:  [-0.1214% +0.2761% +0.6853%]
                        No change in performance detected.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
Renderpass: Single Threaded/1 renderpasses x 10000 draws (Submit Time)
                        time:   [2.1494 ms 2.1508 ms 2.1522 ms]
                        thrpt:  [4.6464 Melem/s 4.6494 Melem/s 4.6525 Melem/s]
                 change:
                        time:   [-1.3183% -1.2195% -1.1239%] (p = 0.00 < 0.05)
                        thrpt:  [+1.1367% +1.2346% +1.3359%]
                        Performance has improved.
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) low mild
Renderpass: Single Threaded/2 renderpasses x 5000 draws (Submit Time)
                        time:   [3.5806 ms 3.5860 ms 3.5918 ms]
                        thrpt:  [2.7841 Melem/s 2.7886 Melem/s 2.7928 Melem/s]
                 change:
                        time:   [-1.2956% -1.0521% -0.7998%] (p = 0.00 < 0.05)
                        thrpt:  [+0.8062% +1.0633% +1.3126%]
                        Change within noise threshold.
Found 7 outliers among 100 measurements (7.00%)
  7 (7.00%) high mild
Renderpass: Single Threaded/4 renderpasses x 2500 draws (Submit Time)
                        time:   [4.6223 ms 4.6355 ms 4.6491 ms]
                        thrpt:  [2.1510 Melem/s 2.1573 Melem/s 2.1634 Melem/s]
                 change:
                        time:   [-0.9455% -0.6098% -0.2554%] (p = 0.00 < 0.05)
                        thrpt:  [+0.2560% +0.6135% +0.9545%]
                        Change within noise threshold.
Renderpass: Single Threaded/8 renderpasses x 1250 draws (Submit Time)
                        time:   [6.2461 ms 6.2570 ms 6.2683 ms]
                        thrpt:  [1.5953 Melem/s 1.5982 Melem/s 1.6010 Melem/s]
                 change:
                        time:   [-1.6490% -1.4050% -1.1671%] (p = 0.00 < 0.05)
                        thrpt:  [+1.1809% +1.4250% +1.6767%]
                        Performance has improved.
Found 14 outliers among 100 measurements (14.00%)
  10 (10.00%) high mild
  4 (4.00%) high severe

@nical nical enabled auto-merge (squash) July 31, 2024 16:19
@nical nical merged commit 9c6ae1b into gfx-rs:trunk Jul 31, 2024
25 checks passed
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.

4 participants