Walther / clovers

Ray Tracing in Rust
https://walther.github.io/clovers/clovers/
13 stars 1 forks source link

Fix up `tracing-timing` integration #77

Closed hawkw closed 3 years ago

hawkw commented 3 years ago

This makes the following changes:

I hope I correctly understood what this code was doing --- if not, I may have put spans in the wrong places. But...you can keep tweaking the instrumentation as much as you like, now that we can actually print histograms without dying.

Current output looks like this:

warning: `clovers` (bin "clovers") generated 1 warning
    Finished release [optimized] target(s) in 5.05s
     Running `target/release/clovers --input clovers/scenes/scene.json --samples 1`
clovers 🍀    ray tracing in rust 🦀
width:        1024
height:       1024
samples:      1
max depth:    100
approx. rays: 104857600

Elapsed: 00:00:09
Pixels:  ███████████████████░ 1048000/1048576
ETA:     00:00:00

finished render in 9s 873ms 699us 675ns
output saved: renders/1628360794.png

draw -> ray_color:
 | mean: 8.6µs, p50: 8µs, p90: 16µs, p99: 24µs, p999: 57µs, max: 8232µs
 |
 |   25µs | **************************************** | 99.8th %-ile

pixel -> ray_color:
 | mean: 29.8µs, p50: 16µs, p90: 73µs, p99: 172µs, p999: 327µs, max: 8495µs
 |
 |   25µs | *****************************            | 71.4th %-ile
 |   50µs | ******                                   | 85.7th %-ile
 |   75µs | ***                                      | 92.1th %-ile
 |  100µs | **                                       | 95.6th %-ile