Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
1
third-party/vendor/profiling/.cargo-checksum.json
vendored
Normal file
1
third-party/vendor/profiling/.cargo-checksum.json
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"files":{"Cargo.lock":"43b67e41ee80050fe92cbe1359e9959e4f59527683d5b08ae6a5893e2bbd27b2","Cargo.toml":"7b9eecdae76acba277d0f76fcea0e02ec16f2f4f24dd37c41d107305ad8518fb","README.md":"26c01565290b56b3893652c732864adc47bbeaaaf8211235839bfd73b45f8c86","src/empty_impl.rs":"341753cbc92275dc45184c22d60b5192854f35d6c57fdcd68b4ba17a6df59a27","src/lib.rs":"2eb645fff043b95ac6e37b5304f0d1b0fe6d7935c68a644f21c4d6dd83aa1907","src/optick_impl.rs":"167d92d27ac5c0e29b022f93c64d1d3b0e08db5bf0282f8874df465ab2fbe350","src/puffin_impl.rs":"70423e2e348ea0539b253841ad0ce594dd814f60d02ca5f8413a492a8f5cf0ec","src/superluminal_impl.rs":"9bf236c5435147b090cdb1e706f0480639590c6ca1a08ce795c9bcb714a7f1f8","src/tracing_impl.rs":"92bdbd9fc760d258287df13f301f999f678f9ef742c599f7e71b668746743119","src/tracy_impl.rs":"3ec4a69b2e27aa1c3e61a179e87703afb5ef76121c08ef65a5cefdbc7da53259","src/type_check_impl.rs":"daf88bb080b6d68e38206667a3d725948a3c836a0c0577d09354bde1e4213920"},"package":"43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58"}
|
||||
947
third-party/vendor/profiling/Cargo.lock
generated
vendored
Normal file
947
third-party/vendor/profiling/Cargo.lock
generated
vendored
Normal file
|
|
@ -0,0 +1,947 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "aho-corasick"
|
||||
version = "1.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "android-tzdata"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
|
||||
|
||||
[[package]]
|
||||
name = "android_system_properties"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ansi_term"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.79"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca"
|
||||
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||
|
||||
[[package]]
|
||||
name = "bincode"
|
||||
version = "1.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||
|
||||
[[package]]
|
||||
name = "bumpalo"
|
||||
version = "3.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f"
|
||||
|
||||
[[package]]
|
||||
name = "byteorder"
|
||||
version = "1.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
||||
|
||||
[[package]]
|
||||
name = "cc"
|
||||
version = "1.0.83"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||
|
||||
[[package]]
|
||||
name = "chrono"
|
||||
version = "0.4.34"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b"
|
||||
dependencies = [
|
||||
"android-tzdata",
|
||||
"iana-time-zone",
|
||||
"num-traits",
|
||||
"windows-targets 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "core-foundation-sys"
|
||||
version = "0.8.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3"
|
||||
dependencies = [
|
||||
"atty",
|
||||
"humantime",
|
||||
"log",
|
||||
"regex",
|
||||
"termcolor",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "generator"
|
||||
version = "0.7.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
"log",
|
||||
"rustversion",
|
||||
"windows",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.1.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "humantime"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
|
||||
dependencies = [
|
||||
"quick-error",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "iana-time-zone"
|
||||
version = "0.1.60"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141"
|
||||
dependencies = [
|
||||
"android_system_properties",
|
||||
"core-foundation-sys",
|
||||
"iana-time-zone-haiku",
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
"windows-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "iana-time-zone-haiku"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.68"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee"
|
||||
dependencies = [
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.153"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
|
||||
|
||||
[[package]]
|
||||
name = "lock_api"
|
||||
version = "0.4.11"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
"scopeguard",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "log"
|
||||
version = "0.4.20"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
|
||||
|
||||
[[package]]
|
||||
name = "loom"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7e045d70ddfbc984eacfa964ded019534e8f6cbf36f6410aee0ed5cefa5a9175"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"generator",
|
||||
"scoped-tls",
|
||||
"tracing",
|
||||
"tracing-subscriber 0.3.18",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "matchers"
|
||||
version = "0.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f099785f7595cc4b4553a174ce30dd7589ef93391ff414dbb67f62392b9e0ce1"
|
||||
dependencies = [
|
||||
"regex-automata 0.1.10",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "matchers"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
|
||||
dependencies = [
|
||||
"regex-automata 0.1.10",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "memchr"
|
||||
version = "2.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
|
||||
|
||||
[[package]]
|
||||
name = "nu-ansi-term"
|
||||
version = "0.46.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
|
||||
dependencies = [
|
||||
"overload",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num-traits"
|
||||
version = "0.2.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a"
|
||||
dependencies = [
|
||||
"autocfg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.19.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
||||
|
||||
[[package]]
|
||||
name = "optick"
|
||||
version = "1.3.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d7e7ab6068cdba9928db83674b18fe7aa2efbaa9920698d260ecbaf7906c6548"
|
||||
|
||||
[[package]]
|
||||
name = "overload"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot"
|
||||
version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f"
|
||||
dependencies = [
|
||||
"lock_api",
|
||||
"parking_lot_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "parking_lot_core"
|
||||
version = "0.9.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"redox_syscall",
|
||||
"smallvec",
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pin-project-lite"
|
||||
version = "0.2.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.78"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "profiling"
|
||||
version = "1.0.15"
|
||||
dependencies = [
|
||||
"bincode",
|
||||
"env_logger",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"optick",
|
||||
"profiling-procmacros",
|
||||
"puffin",
|
||||
"superluminal-perf",
|
||||
"tracing",
|
||||
"tracing-subscriber 0.2.25",
|
||||
"tracing-tracy",
|
||||
"tracy-client 0.17.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "profiling-procmacros"
|
||||
version = "1.0.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "puffin"
|
||||
version = "0.19.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b9f76ad4bb049fded4e572df72cbb6381ff5d1f41f85c3a04b56e4eca287a02f"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"byteorder",
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
"parking_lot",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "quick-error"
|
||||
version = "1.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
|
||||
|
||||
[[package]]
|
||||
name = "quote"
|
||||
version = "1.0.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.10.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-automata 0.4.5",
|
||||
"regex-syntax 0.8.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.1.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
|
||||
dependencies = [
|
||||
"regex-syntax 0.6.29",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-automata"
|
||||
version = "0.4.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd"
|
||||
dependencies = [
|
||||
"aho-corasick",
|
||||
"memchr",
|
||||
"regex-syntax 0.8.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.29"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.8.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
|
||||
|
||||
[[package]]
|
||||
name = "rustversion"
|
||||
version = "1.0.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c"
|
||||
|
||||
[[package]]
|
||||
name = "scoped-tls"
|
||||
version = "1.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.196"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.196"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.113"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sharded-slab"
|
||||
version = "0.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "smallvec"
|
||||
version = "1.13.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
|
||||
|
||||
[[package]]
|
||||
name = "superluminal-perf"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "80ed8ddf5d2a4a849fa7dc75b3e0be740adb882fe7fee87e79584402ac9b1e60"
|
||||
dependencies = [
|
||||
"superluminal-perf-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "superluminal-perf-sys"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0342a02bcc62538822a46f54294130677f026666c2e19d078fc213b7bc07ff16"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "2.0.49"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"unicode-ident",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "termcolor"
|
||||
version = "1.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
|
||||
dependencies = [
|
||||
"winapi-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "thread_local"
|
||||
version = "1.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing"
|
||||
version = "0.1.40"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
|
||||
dependencies = [
|
||||
"pin-project-lite",
|
||||
"tracing-attributes",
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-attributes"
|
||||
version = "0.1.27"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-core"
|
||||
version = "0.1.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"valuable",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-log"
|
||||
version = "0.1.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2"
|
||||
dependencies = [
|
||||
"log",
|
||||
"once_cell",
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-log"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
|
||||
dependencies = [
|
||||
"log",
|
||||
"once_cell",
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-serde"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"tracing-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-subscriber"
|
||||
version = "0.2.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0e0d2eaa99c3c2e41547cfa109e910a68ea03823cccad4a0525dcbc9b01e8c71"
|
||||
dependencies = [
|
||||
"ansi_term",
|
||||
"chrono",
|
||||
"lazy_static",
|
||||
"matchers 0.0.1",
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sharded-slab",
|
||||
"smallvec",
|
||||
"thread_local",
|
||||
"tracing",
|
||||
"tracing-core",
|
||||
"tracing-log 0.1.4",
|
||||
"tracing-serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-subscriber"
|
||||
version = "0.3.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
|
||||
dependencies = [
|
||||
"matchers 0.1.0",
|
||||
"nu-ansi-term",
|
||||
"once_cell",
|
||||
"regex",
|
||||
"sharded-slab",
|
||||
"smallvec",
|
||||
"thread_local",
|
||||
"tracing",
|
||||
"tracing-core",
|
||||
"tracing-log 0.2.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracing-tracy"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b668a0e08f29842a38973cc33317dba03a3062538c762df7425aa6397bce480a"
|
||||
dependencies = [
|
||||
"tracing-core",
|
||||
"tracing-subscriber 0.2.25",
|
||||
"tracy-client 0.10.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracy-client"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9e8ccdb37ca05e354a50011b8a195f115215e46324f65be92495859882cea453"
|
||||
dependencies = [
|
||||
"tracy-client-sys 0.11.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracy-client"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "59fb931a64ff88984f86d3e9bcd1ae8843aa7fe44dd0f8097527bc172351741d"
|
||||
dependencies = [
|
||||
"loom",
|
||||
"once_cell",
|
||||
"tracy-client-sys 0.22.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracy-client-sys"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ee6f0f7878155b6102ab5aba86a92ec4357702ad44683df68ab5493ba3c86a2"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tracy-client-sys"
|
||||
version = "0.22.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d104d610dfa9dd154535102cc9c6164ae1fa37842bc2d9e83f9ac82b0ae0882"
|
||||
dependencies = [
|
||||
"cc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "unicode-ident"
|
||||
version = "1.0.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
||||
|
||||
[[package]]
|
||||
name = "valuable"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.91"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"wasm-bindgen-macro",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.91"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"log",
|
||||
"once_cell",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.91"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.91"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.91"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838"
|
||||
|
||||
[[package]]
|
||||
name = "winapi"
|
||||
version = "0.3.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
||||
dependencies = [
|
||||
"winapi-i686-pc-windows-gnu",
|
||||
"winapi-x86_64-pc-windows-gnu",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-i686-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
[[package]]
|
||||
name = "winapi-util"
|
||||
version = "0.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
||||
[[package]]
|
||||
name = "windows"
|
||||
version = "0.48.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
|
||||
dependencies = [
|
||||
"windows-targets 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-core"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
|
||||
dependencies = [
|
||||
"windows-targets 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm 0.48.5",
|
||||
"windows_aarch64_msvc 0.48.5",
|
||||
"windows_i686_gnu 0.48.5",
|
||||
"windows_i686_msvc 0.48.5",
|
||||
"windows_x86_64_gnu 0.48.5",
|
||||
"windows_x86_64_gnullvm 0.48.5",
|
||||
"windows_x86_64_msvc 0.48.5",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-targets"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd"
|
||||
dependencies = [
|
||||
"windows_aarch64_gnullvm 0.52.0",
|
||||
"windows_aarch64_msvc 0.52.0",
|
||||
"windows_i686_gnu 0.52.0",
|
||||
"windows_i686_msvc 0.52.0",
|
||||
"windows_x86_64_gnu 0.52.0",
|
||||
"windows_x86_64_gnullvm 0.52.0",
|
||||
"windows_x86_64_msvc 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_msvc"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_gnu"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
|
||||
|
||||
[[package]]
|
||||
name = "windows_i686_msvc"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnu"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_gnullvm"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.48.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
|
||||
|
||||
[[package]]
|
||||
name = "windows_x86_64_msvc"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04"
|
||||
102
third-party/vendor/profiling/Cargo.toml
vendored
Normal file
102
third-party/vendor/profiling/Cargo.toml
vendored
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
|
||||
#
|
||||
# When uploading crates to the registry Cargo will automatically
|
||||
# "normalize" Cargo.toml files for maximal compatibility
|
||||
# with all versions of Cargo and also rewrite `path` dependencies
|
||||
# to registry (e.g., crates.io) dependencies.
|
||||
#
|
||||
# If you are reading this file be aware that the original Cargo.toml
|
||||
# will likely look very different (and much more reasonable).
|
||||
# See Cargo.toml.orig for the original contents.
|
||||
|
||||
[package]
|
||||
edition = "2018"
|
||||
name = "profiling"
|
||||
version = "1.0.15"
|
||||
authors = ["Philip Degarmo <aclysma@gmail.com>"]
|
||||
exclude = [
|
||||
"/examples",
|
||||
"/screenshots",
|
||||
]
|
||||
description = "This crate provides a very thin abstraction over other profiler crates."
|
||||
homepage = "https://github.com/aclysma/profiling"
|
||||
readme = "README.md"
|
||||
keywords = [
|
||||
"performance",
|
||||
"profiling",
|
||||
]
|
||||
categories = ["development-tools::profiling"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/aclysma/profiling"
|
||||
|
||||
[[example]]
|
||||
name = "simple"
|
||||
path = "examples/simple.rs"
|
||||
required-features = []
|
||||
|
||||
[dependencies.optick]
|
||||
version = "1.3"
|
||||
optional = true
|
||||
|
||||
[dependencies.profiling-procmacros]
|
||||
version = "1.0.15"
|
||||
optional = true
|
||||
|
||||
[dependencies.puffin]
|
||||
version = "0.19"
|
||||
optional = true
|
||||
|
||||
[dependencies.superluminal-perf]
|
||||
version = "0.1"
|
||||
optional = true
|
||||
|
||||
[dependencies.tracing]
|
||||
version = "0.1"
|
||||
optional = true
|
||||
|
||||
[dependencies.tracy-client]
|
||||
version = "0.17"
|
||||
optional = true
|
||||
|
||||
[dev-dependencies.bincode]
|
||||
version = "1.3.1"
|
||||
|
||||
[dev-dependencies.env_logger]
|
||||
version = "0.6"
|
||||
|
||||
[dev-dependencies.lazy_static]
|
||||
version = "1"
|
||||
|
||||
[dev-dependencies.log]
|
||||
version = "0.4"
|
||||
|
||||
[dev-dependencies.tracing-subscriber]
|
||||
version = "0.2"
|
||||
|
||||
[dev-dependencies.tracing-tracy]
|
||||
version = "0.4.0"
|
||||
|
||||
[features]
|
||||
default = ["procmacros"]
|
||||
procmacros = ["profiling-procmacros"]
|
||||
profile-with-optick = [
|
||||
"optick",
|
||||
"profiling-procmacros?/profile-with-optick",
|
||||
]
|
||||
profile-with-puffin = [
|
||||
"puffin",
|
||||
"profiling-procmacros?/profile-with-puffin",
|
||||
]
|
||||
profile-with-superluminal = [
|
||||
"superluminal-perf",
|
||||
"profiling-procmacros?/profile-with-superluminal",
|
||||
]
|
||||
profile-with-tracing = [
|
||||
"tracing",
|
||||
"profiling-procmacros?/profile-with-tracing",
|
||||
]
|
||||
profile-with-tracy = [
|
||||
"tracy-client",
|
||||
"profiling-procmacros?/profile-with-tracy",
|
||||
]
|
||||
type-check = []
|
||||
244
third-party/vendor/profiling/README.md
vendored
Normal file
244
third-party/vendor/profiling/README.md
vendored
Normal file
|
|
@ -0,0 +1,244 @@
|
|||
# profiling
|
||||
|
||||
Provides a very thin abstraction over instrumented profiling crates like `puffin`, `optick`, `tracy`, and `superluminal-perf`.
|
||||
|
||||
Mark up your code like this:
|
||||
|
||||
```rust
|
||||
#[profiling::function]
|
||||
fn some_function() {
|
||||
burn_time(5);
|
||||
|
||||
for i in 0..5 {
|
||||
profiling::scope!("Looped Operation");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
See below for resulting visualization and more details on the exposed API.
|
||||
|
||||
**Friendly Warning:** Some profiler backends implicitly listen on network ports immediately when the host app is
|
||||
launched. If this is a concern, please review the enabled profiler(s) documentation for details!
|
||||
|
||||
## Puffin
|
||||
|
||||
* https://github.com/EmbarkStudios/puffin
|
||||
* Cross-platform
|
||||
* You need to call `profiling::finish_frame!()` at least once per frame
|
||||
* To show the flamegraph, you either need to use [`puffin_http`](`https://github.com/EmbarkStudios/puffin/tree/main/puffin_http`) and [`puffin_viewer`](`https://github.com/EmbarkStudios/puffin/tree/main/puffin_viewer`), or if you're writing an [`egui`](https://github.com/emilk/egui) app, use [`puffin_egui`](`https://github.com/EmbarkStudios/puffin/tree/main/puffin_egui`).
|
||||
|
||||
[](screenshots/puffin.png)
|
||||
|
||||
## Optick
|
||||
|
||||
* https://github.com/bombomby/optick
|
||||
* The upstream crate only provides binaries for windows. However it could probably be made to work by building
|
||||
optick capture code and linking against it manually. The UI is windows only.
|
||||
|
||||
[](screenshots/optick.jpeg)
|
||||
|
||||
## Superluminal
|
||||
|
||||
* https://superluminal.eu
|
||||
* Windows only
|
||||
|
||||
[](screenshots/superluminal.jpeg)
|
||||
|
||||
## Tracing
|
||||
|
||||
* https://crates.io/crates/tracing
|
||||
* Cross-platform
|
||||
* The tracing backend injects tracing `span!()` macros that match the lifetime of the profiling macros.
|
||||
Tracing uses callbacks rather than inlining specific pre-determined code,
|
||||
so it is more flexible than profiling
|
||||
(at the cost of more lines of code and potentially higher overhead).
|
||||
This allows existing and new tracing-compatible handlers to work with profiling.
|
||||
|
||||

|
||||
|
||||
## Tracy
|
||||
|
||||
* https://github.com/wolfpld/tracy
|
||||
* Cross-platform (windows, macOS, linux)
|
||||
|
||||
[](screenshots/tracy.jpeg)
|
||||
|
||||
## Usage
|
||||
|
||||
Currently, there's just six macros:
|
||||
* `profiling::scope!(name: &str, [tag: &str])`
|
||||
* name: scopes will appear in the profiler under this name
|
||||
* tag: optional extra data
|
||||
* `#[profiling::function]`
|
||||
* procmacro placed on a function to quickly wrap it in a scope using the function name
|
||||
* `#[profiling::all_functions]`
|
||||
* procmacro placed on a struct impl block to apply `#[profiling::function]` on each function under that struct impl block
|
||||
* `#[profiling::skip]`
|
||||
* use with `#[profiling::all_functions]`, placed this procmacro on a function to avoid the action that `#[profiling::all_functions]` apply
|
||||
* `profiling::register_thread!([name: &str])`
|
||||
* name: optional, defaults to `std::thread::current().name`, or `.id` if it's unnamed
|
||||
* `profiling::finish_frame!()`
|
||||
* Many profilers have the concept of a "frame" as a unit of work. Use this to indicate where one frame ends and the
|
||||
next one begins.
|
||||
|
||||
Support for individual profilers can be turned on/off with feature flags. By default, they're all off, resulting in
|
||||
no dependencies or runtime code.
|
||||
|
||||
## Who is this for?
|
||||
* Authors of binaries that want to have multiple options for profiling their code, but don't want to duplicate their
|
||||
instrumentation once per each profiler's individual API.
|
||||
* Authors of libraries that would like to instrument their crate for their end-users.
|
||||
|
||||
This crate is intended to be **TINY**. It won't support every possible usage, just the basics. I'm open to adding
|
||||
more things but I plan to be very selective to maintain a slim size.
|
||||
|
||||
When enabled, using a macro produces identical code as if you used the wrapped profiling API directly. So it is
|
||||
completely fine to directly use a profiler's API when this abstraction doesn't support something you want to do.
|
||||
|
||||
## Alternatives
|
||||
|
||||
**tracing**: `tracing` is more flexible than `profiling` but is significantly larger and has
|
||||
some potential runtime cost. `profiling` is only useful for instrumented profiling. Instrumentation is inserted directly
|
||||
into your code inline via macros as if you were using the profiler's crate directly. This results in smaller code with
|
||||
no additional overhead.
|
||||
|
||||
Using profiling crates (i.e. puffin/optick/etc.) directly:
|
||||
* For authors of binaries, you may still need to use APIs on those crates to get started. But when instrumenting your
|
||||
code, `profiling::scope!("Scope Name")` inside a function or `#[profiling::function]` on a function will instrument
|
||||
it for all the supported profiler-specific crates. You can still use those crates directly if you want to take
|
||||
advantage of custom APIs they provide to surface additional data.
|
||||
* For authors of upstream libraries, this crate lets you implement simple instrumentation once. Hopefully this will
|
||||
allow the community to benefit from instrumented profiling, even if a significant amount of a codebase is made
|
||||
of upstream crates.
|
||||
|
||||
## Using from a Binary
|
||||
|
||||
It's up to you to initialize the profiling crate of your choice (although some do not need explicit initialization
|
||||
and will immediately work). The examples demonstrate this for all the supported crates, but it's worth looking
|
||||
at the docs for the profiler you're interested in using! `profiling` re-exports the profiler crates if they are
|
||||
enabled, simplifying the modifications you would need to make to your Cargo.toml.
|
||||
|
||||
Once initialized, you can mix/match the macros provided by your profiler of choice and the generic ones in this
|
||||
crate. For example:
|
||||
|
||||
```rust
|
||||
// This may map to something like:
|
||||
// - puffin::profile_scope!("Scope Name")
|
||||
// - optick::event!("Scope Name")
|
||||
// - tracing::span!(tracing::Level::INFO, "Scope Name")
|
||||
// - superluminal_perf::begin_event("Scope Name")
|
||||
profiling::scope!("Scope Name");
|
||||
|
||||
// This may map to something like:
|
||||
// - puffin::profile_scope_data!("Scope Name", "extra data")
|
||||
// - optick::event!("Scope Name"); optick::tag!("tag", "extra data");
|
||||
// - tracing::span!(tracing::Level::INFO, "Scope Name", tag = "extra data")
|
||||
// - superluminal_perf::begin_event_with_data("Scope Name", "extra data", 0)
|
||||
profiling::scope!("Scope Name", "extra data");
|
||||
```
|
||||
|
||||
There is also a proc macro to decorate functions:
|
||||
|
||||
```rust
|
||||
#[profiling::function]
|
||||
fn my_function() {
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
Take a look at the code for the helpful macros `register_thread!()` and `finish_frame!()`.
|
||||
|
||||
I recommend adding features for each backend you want to use to your binary crate. This allows you to optionally compile
|
||||
in code to setup and configure a backend.
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
profiling = "1.0"
|
||||
|
||||
[features]
|
||||
profile-with-puffin = ["profiling/profile-with-puffin"]
|
||||
profile-with-optick = ["profiling/profile-with-optick"]
|
||||
profile-with-superluminal = ["profiling/profile-with-superluminal"]
|
||||
profile-with-tracing = ["profiling/profile-with-tracing"]
|
||||
profile-with-tracy = ["profiling/profile-with-tracy"]
|
||||
```
|
||||
|
||||
* You can use the default feature to quickly/temporarily turn something on: `default = ["profile-with-optick"]`
|
||||
* `cargo run --features=profile-with-optick` works too!
|
||||
|
||||
## Using from a Library
|
||||
|
||||
Add the profiling crate to Cargo.toml:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
profiling = "1.0"
|
||||
```
|
||||
|
||||
Now you can instrument your library using the API exposed via the `profiling` crate.
|
||||
|
||||
If the end-user of your library doesn't use profiling, the macros in this crate will emit no code at all.
|
||||
|
||||
## Feature Flags
|
||||
|
||||
* profile-with-puffin: Enable the `puffin` crate
|
||||
* profile-with-optick: Enable the `optick` crate
|
||||
* profile-with-superluminal: Enable the `superluminal-perf` crate
|
||||
* profile-with-tracing: Enable the `tracing` crate. (This is just an abstraction layer - you'd want to hook it to do something!)
|
||||
* profile-with-tracy: Enable the `tracy-client` crate.
|
||||
|
||||
**Only one backend can be enabled at a time!**
|
||||
|
||||
## Examples
|
||||
|
||||
* simple: Shows a bare minimum requirements to do some simple instrumented profiling. Once it's running, you
|
||||
can connect to the process using optick/tracy/superluminal. Some of these are windows only!
|
||||
|
||||
```
|
||||
run --example simple --features="profile-with-optick"
|
||||
run --example simple --features="profile-with-tracy"
|
||||
run --example simple --features="profile-with-puffin"
|
||||
run --example simple --features="profile-with-superluminal"
|
||||
```
|
||||
|
||||
* puffin: Launches a basic app with imgui integration showing the puffin UI. This one should run everywhere
|
||||
that supports imgui.
|
||||
|
||||
```
|
||||
cargo run --example puffin --features="profile-with-puffin"
|
||||
```
|
||||
|
||||
## MSRV
|
||||
|
||||
This project will strive to keep a conservative MSRV, but practically this is most likely to be
|
||||
limited by upstream crate MSRV. It may be that some backends will support a lower MSRV than others.
|
||||
|
||||
Because the MSRV is in practice variable based on what features are enabled, no MSRV will be set in
|
||||
cargo.toml. Otherwise this crate would only compile with the least conservative MSRV of all possible
|
||||
upstream profiling backends.
|
||||
|
||||
As a point of reference, currently the most popular crate relying on profiling is wgpu, and their
|
||||
MSRV is constrained to Firefox nightly build MSRV. So the MSRV of this crate (ignoring backends)
|
||||
should not move faster than wgpu and firefox nightly. (See `MINIMUM_RUST_VERSION` in
|
||||
[`python/mozboot/mozboot/util.py`](https://searchfox.org/mozilla-central/source/python/mozboot/mozboot/util.py))
|
||||
|
||||
## License
|
||||
|
||||
Licensed under either of
|
||||
|
||||
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
||||
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
|
||||
|
||||
at your option.
|
||||
|
||||
The examples directory contains [`NotoSans-Medium.ttf`](https://www.google.com/get/noto/), available under SIL Open Font
|
||||
License (OFL).
|
||||
|
||||
### Contribution
|
||||
|
||||
Unless you explicitly state otherwise, any contribution intentionally
|
||||
submitted for inclusion in the work by you, as defined in the Apache-2.0
|
||||
license, shall be dual licensed as above, without any additional terms or
|
||||
conditions.
|
||||
|
||||
See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT).
|
||||
34
third-party/vendor/profiling/src/empty_impl.rs
vendored
Normal file
34
third-party/vendor/profiling/src/empty_impl.rs
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/// Opens a scope. Two variants:
|
||||
/// - profiling::scope!(name: &str) - Opens a scope with the given name
|
||||
/// - profiling::scope!(name: &str, data: &str) - Opens a scope with the given name and an extra
|
||||
/// datafield. Details of this depend on the API, but it should be a &str. If the extra data is
|
||||
/// named, it will be named "tag". Some APIs support adding more data (for example, `optic::tag!`)
|
||||
///
|
||||
/// ```
|
||||
/// profiling::scope!("outer");
|
||||
/// for _ in 0..10 {
|
||||
/// profiling::scope!("inner", format!("iteration {}").as_str());
|
||||
/// }
|
||||
/// ```
|
||||
#[macro_export]
|
||||
macro_rules! scope {
|
||||
($name:expr) => {};
|
||||
($name:expr, $data:expr) => {};
|
||||
}
|
||||
|
||||
/// Registers a thread with the profiler API(s). This is usually setting a name for the thread.
|
||||
/// Two variants:
|
||||
/// - register_thread!() - Tries to get the name of the thread, or an ID if no name is set
|
||||
/// - register_thread!(name: &str) - Registers the thread using the given name
|
||||
#[macro_export]
|
||||
macro_rules! register_thread {
|
||||
() => {};
|
||||
($name:expr) => {};
|
||||
}
|
||||
|
||||
/// Finishes the frame. This isn't strictly necessary for some kinds of applications but a pretty
|
||||
/// normal thing to track in games.
|
||||
#[macro_export]
|
||||
macro_rules! finish_frame {
|
||||
() => {};
|
||||
}
|
||||
167
third-party/vendor/profiling/src/lib.rs
vendored
Normal file
167
third-party/vendor/profiling/src/lib.rs
vendored
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
//
|
||||
// To use this library, enable one of the feature flags. Each backend implementation provides the
|
||||
// exact same interface. Only one may be active at a time.
|
||||
//
|
||||
|
||||
// This library itself does not require std, but if any features are enabled, the upstream crate
|
||||
// likely will bring in std.
|
||||
#![no_std]
|
||||
|
||||
/// Proc macro for creating a scope around each function under struct impl block
|
||||
/// ```
|
||||
/// pub struct Foo {
|
||||
/// // some data...
|
||||
/// }
|
||||
///
|
||||
/// #[profiling::all_functions]
|
||||
/// impl Foo {
|
||||
/// pub fn do_something(&self) {
|
||||
/// // some code...
|
||||
/// }
|
||||
///
|
||||
/// pub fn do_otherthing(&self) {
|
||||
/// // some code...
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// The following will generate the same code
|
||||
///
|
||||
/// ```
|
||||
/// pub struct Foo {
|
||||
/// // some data...
|
||||
/// }
|
||||
///
|
||||
/// impl Foo {
|
||||
/// #[profiling::function]
|
||||
/// pub fn do_something(&self) {
|
||||
/// // some code...
|
||||
/// }
|
||||
///
|
||||
/// #[profiling::function]
|
||||
/// pub fn do_otherthing(&self) {
|
||||
/// // some code...
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
#[cfg(feature = "procmacros")]
|
||||
pub use profiling_procmacros::all_functions;
|
||||
/// Proc macro for creating a scope around the function, using the name of the function for the
|
||||
/// scope's name
|
||||
///
|
||||
/// This must be done as a proc macro because tracing requires a const string
|
||||
///
|
||||
/// ```
|
||||
/// #[profiling::function]
|
||||
/// fn my_function() {
|
||||
///
|
||||
/// }
|
||||
/// ```
|
||||
#[cfg(feature = "procmacros")]
|
||||
pub use profiling_procmacros::function;
|
||||
/// Proc macro to skip the auto_impl for the function
|
||||
/// ```
|
||||
/// pub struct Foo {
|
||||
/// // some data...
|
||||
/// }
|
||||
///
|
||||
/// #[profiling::all_functions]
|
||||
/// impl Foo {
|
||||
/// pub fn do_something(&self) {
|
||||
/// // some code...
|
||||
/// }
|
||||
///
|
||||
/// #[profiling::skip]
|
||||
/// pub fn do_otherthing(&self) {
|
||||
/// // some code...
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
///
|
||||
/// The following will generate the same code
|
||||
///
|
||||
/// ```
|
||||
/// pub struct Foo {
|
||||
/// // some data...
|
||||
/// }
|
||||
///
|
||||
/// impl Foo {
|
||||
/// #[profiling::function]
|
||||
/// pub fn do_something(&self) {
|
||||
/// // some code...
|
||||
/// }
|
||||
///
|
||||
/// pub fn do_otherthing(&self) {
|
||||
/// // some code...
|
||||
/// }
|
||||
/// }
|
||||
/// ```
|
||||
#[cfg(feature = "procmacros")]
|
||||
pub use profiling_procmacros::skip;
|
||||
|
||||
#[cfg(feature = "profile-with-puffin")]
|
||||
pub use puffin;
|
||||
#[cfg(feature = "profile-with-puffin")]
|
||||
mod puffin_impl;
|
||||
#[cfg(feature = "profile-with-puffin")]
|
||||
#[allow(unused_imports)]
|
||||
pub use puffin_impl::*;
|
||||
|
||||
#[cfg(feature = "profile-with-optick")]
|
||||
pub use optick;
|
||||
#[cfg(feature = "profile-with-optick")]
|
||||
mod optick_impl;
|
||||
#[cfg(feature = "profile-with-optick")]
|
||||
#[allow(unused_imports)]
|
||||
pub use optick_impl::*;
|
||||
|
||||
#[cfg(feature = "profile-with-superluminal")]
|
||||
pub use superluminal_perf;
|
||||
#[cfg(feature = "profile-with-superluminal")]
|
||||
mod superluminal_impl;
|
||||
#[cfg(feature = "profile-with-superluminal")]
|
||||
#[allow(unused_imports)]
|
||||
pub use superluminal_impl::*;
|
||||
|
||||
#[cfg(feature = "profile-with-tracing")]
|
||||
pub use tracing;
|
||||
#[cfg(feature = "profile-with-tracing")]
|
||||
mod tracing_impl;
|
||||
#[cfg(feature = "profile-with-tracing")]
|
||||
#[allow(unused_imports)]
|
||||
pub use tracing_impl::*;
|
||||
|
||||
#[cfg(feature = "profile-with-tracy")]
|
||||
pub use tracy_client;
|
||||
#[cfg(feature = "profile-with-tracy")]
|
||||
mod tracy_impl;
|
||||
#[cfg(feature = "profile-with-tracy")]
|
||||
#[allow(unused_imports)]
|
||||
pub use tracy_impl::*;
|
||||
|
||||
#[cfg(feature = "type-check")]
|
||||
mod type_check_impl;
|
||||
#[cfg(feature = "type-check")]
|
||||
#[allow(unused_imports)]
|
||||
pub use type_check_impl::*;
|
||||
|
||||
#[cfg(not(any(
|
||||
feature = "profile-with-puffin",
|
||||
feature = "profile-with-optick",
|
||||
feature = "profile-with-superluminal",
|
||||
feature = "profile-with-tracing",
|
||||
feature = "profile-with-tracy",
|
||||
feature = "type-check"
|
||||
)))]
|
||||
mod empty_impl;
|
||||
|
||||
#[cfg(not(any(
|
||||
feature = "profile-with-puffin",
|
||||
feature = "profile-with-optick",
|
||||
feature = "profile-with-superluminal",
|
||||
feature = "profile-with-tracing",
|
||||
feature = "profile-with-tracy",
|
||||
feature = "type-check"
|
||||
)))]
|
||||
#[allow(unused_imports)]
|
||||
pub use empty_impl::*;
|
||||
35
third-party/vendor/profiling/src/optick_impl.rs
vendored
Normal file
35
third-party/vendor/profiling/src/optick_impl.rs
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#[macro_export]
|
||||
macro_rules! scope {
|
||||
($name:expr) => {
|
||||
$crate::optick::event!($name);
|
||||
};
|
||||
// NOTE: I've not been able to get attached data to work with optick
|
||||
($name:expr, $data:expr) => {
|
||||
$crate::optick::event!($name);
|
||||
$crate::optick::tag!("tag", $data);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! register_thread {
|
||||
() => {
|
||||
let thread_name = std::thread::current()
|
||||
.name()
|
||||
.map(|x| x.to_string())
|
||||
.unwrap_or_else(|| format!("Thread {:?}", std::thread::current().id()));
|
||||
|
||||
$crate::register_thread!(&thread_name);
|
||||
};
|
||||
($name:expr) => {
|
||||
$crate::optick::register_thread($name);
|
||||
};
|
||||
}
|
||||
|
||||
/// Finishes the frame. This isn't strictly necessary for some kinds of applications but a pretty
|
||||
/// normal thing to track in games.
|
||||
#[macro_export]
|
||||
macro_rules! finish_frame {
|
||||
() => {
|
||||
$crate::optick::next_frame();
|
||||
};
|
||||
}
|
||||
26
third-party/vendor/profiling/src/puffin_impl.rs
vendored
Normal file
26
third-party/vendor/profiling/src/puffin_impl.rs
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#[macro_export]
|
||||
macro_rules! scope {
|
||||
($name:expr) => {
|
||||
$crate::puffin::profile_scope!($name);
|
||||
};
|
||||
($name:expr, $data:expr) => {
|
||||
$crate::puffin::profile_scope!($name, $data);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! register_thread {
|
||||
() => {};
|
||||
($name:expr) => {
|
||||
// puffin uses the thread name
|
||||
};
|
||||
}
|
||||
|
||||
/// Finishes the frame. This isn't strictly necessary for some kinds of applications but a pretty
|
||||
/// normal thing to track in games.
|
||||
#[macro_export]
|
||||
macro_rules! finish_frame {
|
||||
() => {
|
||||
$crate::puffin::GlobalProfiler::lock().new_frame();
|
||||
};
|
||||
}
|
||||
65
third-party/vendor/profiling/src/superluminal_impl.rs
vendored
Normal file
65
third-party/vendor/profiling/src/superluminal_impl.rs
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
#[macro_export]
|
||||
macro_rules! scope {
|
||||
($name:expr) => {
|
||||
let _superluminal_guard = $crate::superluminal::SuperluminalGuard::new($name);
|
||||
};
|
||||
($name:expr, $data:expr) => {
|
||||
let _superluminal_guard =
|
||||
$crate::superluminal::SuperluminalGuard::new_with_data($name, $data);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! register_thread {
|
||||
() => {
|
||||
let thread_name = std::thread::current()
|
||||
.name()
|
||||
.map(|x| x.to_string())
|
||||
.unwrap_or_else(|| format!("Thread {:?}", std::thread::current().id()));
|
||||
|
||||
$crate::register_thread!(&thread_name);
|
||||
};
|
||||
($name:expr) => {
|
||||
$crate::superluminal_perf::set_current_thread_name($name);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! finish_frame {
|
||||
() => {
|
||||
// superluminal does not have a frame end function
|
||||
};
|
||||
}
|
||||
|
||||
//
|
||||
// RAII wrappers to support superluminal. These are public as they need to be callable from macros
|
||||
// but are not intended for direct use.
|
||||
//
|
||||
#[doc(hidden)]
|
||||
pub mod superluminal {
|
||||
pub struct SuperluminalGuard;
|
||||
|
||||
// 0xFFFFFFFF means "use default color"
|
||||
const DEFAULT_SUPERLUMINAL_COLOR: u32 = 0xFFFFFFFF;
|
||||
|
||||
impl SuperluminalGuard {
|
||||
pub fn new(name: &str) -> Self {
|
||||
superluminal_perf::begin_event(name);
|
||||
SuperluminalGuard
|
||||
}
|
||||
|
||||
pub fn new_with_data(
|
||||
name: &str,
|
||||
data: &str,
|
||||
) -> Self {
|
||||
superluminal_perf::begin_event_with_data(name, data, DEFAULT_SUPERLUMINAL_COLOR);
|
||||
SuperluminalGuard
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for SuperluminalGuard {
|
||||
fn drop(&mut self) {
|
||||
superluminal_perf::end_event();
|
||||
}
|
||||
}
|
||||
}
|
||||
22
third-party/vendor/profiling/src/tracing_impl.rs
vendored
Normal file
22
third-party/vendor/profiling/src/tracing_impl.rs
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#[macro_export]
|
||||
macro_rules! scope {
|
||||
($name:expr) => {
|
||||
let _span = $crate::tracing::span!($crate::tracing::Level::INFO, $name);
|
||||
let _span_entered = _span.enter();
|
||||
};
|
||||
($name:expr, $data:expr) => {
|
||||
let _span = $crate::tracing::span!($crate::tracing::Level::INFO, $name, tag = $data);
|
||||
let _span_entered = _span.enter();
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! register_thread {
|
||||
() => {};
|
||||
($name:expr) => {};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! finish_frame {
|
||||
() => {};
|
||||
}
|
||||
68
third-party/vendor/profiling/src/tracy_impl.rs
vendored
Normal file
68
third-party/vendor/profiling/src/tracy_impl.rs
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
#[macro_export]
|
||||
macro_rules! scope {
|
||||
// Note: literal patterns provided as an optimization since they can skip an allocation.
|
||||
($name:literal) => {
|
||||
// Note: callstack_depth is 0 since this has significant overhead
|
||||
let _tracy_span = $crate::tracy_client::span!($name, 0);
|
||||
};
|
||||
($name:literal, $data:expr) => {
|
||||
// Note: callstack_depth is 0 since this has significant overhead
|
||||
let _tracy_span = $crate::tracy_client::span!($name, 0);
|
||||
_tracy_span.emit_text($data);
|
||||
};
|
||||
($name:expr) => {
|
||||
let function_name = {
|
||||
struct S;
|
||||
let type_name = core::any::type_name::<S>();
|
||||
&type_name[..type_name.len() - 3]
|
||||
};
|
||||
let _tracy_span = $crate::tracy_client::Client::running()
|
||||
.expect("scope! without a running tracy_client::Client")
|
||||
// Note: callstack_depth is 0 since this has significant overhead
|
||||
.span_alloc(Some($name), function_name, file!(), line!(), 0);
|
||||
};
|
||||
($name:expr, $data:expr) => {
|
||||
let function_name = {
|
||||
struct S;
|
||||
let type_name = core::any::type_name::<S>();
|
||||
&type_name[..type_name.len() - 3]
|
||||
};
|
||||
let _tracy_span = $crate::tracy_client::Client::running()
|
||||
.expect("scope! without a running tracy_client::Client")
|
||||
// Note: callstack_depth is 0 since this has significant overhead
|
||||
.span_alloc(Some($name), function_name, file!(), line!(), 0);
|
||||
_tracy_span.emit_text($data);
|
||||
};
|
||||
}
|
||||
|
||||
/// Registers a thread with the profiler API(s). This is usually setting a name for the thread.
|
||||
/// Two variants:
|
||||
/// - register_thread!() - Tries to get the name of the thread, or an ID if no name is set
|
||||
/// - register_thread!(name: &str) - Registers the thread using the given name
|
||||
#[macro_export]
|
||||
macro_rules! register_thread {
|
||||
() => {
|
||||
let thread_name = std::thread::current()
|
||||
.name()
|
||||
.map(|x| x.to_string())
|
||||
.unwrap_or_else(|| format!("Thread {:?}", std::thread::current().id()));
|
||||
|
||||
$crate::register_thread!(&thread_name);
|
||||
};
|
||||
($name:expr) => {
|
||||
$crate::tracy_client::Client::running()
|
||||
.expect("register_thread! without a running tracy_client::Client")
|
||||
.set_thread_name($name);
|
||||
};
|
||||
}
|
||||
|
||||
/// Finishes the frame. This isn't strictly necessary for some kinds of applications but a pretty
|
||||
/// normal thing to track in games.
|
||||
#[macro_export]
|
||||
macro_rules! finish_frame {
|
||||
() => {
|
||||
$crate::tracy_client::Client::running()
|
||||
.expect("finish_frame! without a running tracy_client::Client")
|
||||
.frame_mark();
|
||||
};
|
||||
}
|
||||
25
third-party/vendor/profiling/src/type_check_impl.rs
vendored
Normal file
25
third-party/vendor/profiling/src/type_check_impl.rs
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
// This backend is intended to force type checking
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! scope {
|
||||
($name:expr) => {
|
||||
let _: &str = $name;
|
||||
};
|
||||
($name:expr, $data:expr) => {
|
||||
let _: &str = $name;
|
||||
let _: &str = $data;
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! register_thread {
|
||||
() => {};
|
||||
($name:expr) => {
|
||||
let _: &str = $name;
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! finish_frame {
|
||||
() => {};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue