Files
boc/aamos-ledger-rust/target/debug/deps/libquanta-9d4922eea7b84fb9.rmeta
T

185 lines
86 KiB
Plaintext
Raw Normal View History

rust
ïT#rustc 1.96.0 (ac68faa20 2026-05-25)ÁÀ뉊]!ÜÛê(¹Þ—šên-5be7b69c3ff7b5b8ÁíàÄTËŸ ÜJîÄ)'ß\¥!-3d1337db07d0b3aeÁ¤²XctÔ'ÐÓ©z¨ɽÓ-a4945860e1c53b00Á¤°ð ¾ä-±($²ï=©Ã-7e98a21bfd32b0edÁòÖÀH•‘PIÓHã#£-055f30b747f859b6Árustc_std_workspace_coreÁ­Cçß^ò½èÝ$­Çÿ+Cé-c4878ee60b2242c9ÁŸÃï+Ñ]ŠqB<ÏïW#-8dd1dd90e70d0b6aÁ miniz_oxideÁ€š»J(P>àö÷g\K-1eb618da2918ab7fÁadler2ÁÆ;+Þ®5¥Ìýݰ¦ÛLˆ-f7919172d268e069Á hashbrownÁPäV9ÒÆèÜ"ÊÖVŽ\-0fc2184a5da6723aÁrustc_std_workspace_allocÁs&ØòØy¯s•bæ!‰ýŠ-97e4bf30be240674Á
std_detectÁhŠBîÙºÌI®ËÅš-9dbbf8346ba7ac8bÁrustc_demangleÁûë9´Ç×@Œ’ùXFº-f33013f239bf9f14Ácfg_ifÁÜLhž§Œaã¯>­-0a71c8f33a838301Á addr2lineÁ׎Þ!]8V$É@@-e618e6be60e87ba2ÁgimliÁ¸
°µ~Î1‹Ñt ðÁ€w-1f7768a68858f670ÁobjectÁ
áPÃ?­À¶¼QHJ¥-914cd6a4dbe590d1ÁmemchrÁ›º«8Ór­2Ù $¨ûib-cf21ca6f2bb15dcdÁë
‹ás«LÖ€îâƒ×ɯŒ-ee6f3747e38367f0Ácrossbeam_utilsÁ\€v€*˜‚³aÑl®Ø{Í-580ebf62485b3066Á once_cellÁ6ÿ]Ô¯q4c]kÂÓ‹-a47cd60ec4e2e104Áæ\‹±ÔcdùÀTƒ-f86f80b348d33b13Áâ<"ú⬠MonotonicÁL`úâ¬1 wasm_browserÁd«ì×´vìLì×´Ã wasm_wasiÁLØì×´¦ìì×´íhas_counter_supportÁœXìõ´õ œÆìõ´Ïðµ¼çüÎ1켉úiosÁŒ¦œ¥üˆ1üÅvüÁ{0testsÁ,ˆM$ýLYù
,¨4$4{ù
,¸ $­ ù
,·°$¬°ÀclocksÁ counterÁ
 nowÁ   monotonicÁú    detectionÁõ mockÁIntoNanosecondsÁ
into_nanosÁ Ÿ
"Ÿ
$æ $ incrementÁ&Ÿ& $ decrementÁ)Ÿ) $»
  instantÁ0000000000 0
0< <recentÁ<duration_sinceÁ<checked_duration_sinceÁ<saturating_duration_sinceÁ<elapsedÁ< checked_addÁ< checked_subÁ0E°E0H0J°JÚ0MÛ0O°OÚ0Rï
0T0V×
upkeepÁYYYYYYYYYY Y
Y Y Y
YYGLOBAL_UPKEEP_RUNNINGÁYj×YlsourceÁYnæ nnew_with_clockÁn¹q q Ytãu statsÁ{||meanÁ|
mean_errorÁ|mean_with_errorÁ|has_significant_resultÁ|samplesÁ GLOBAL_CLOCKÁ
GLOBAL_RECENTÁGLOBAL_CALIBRATIONÁMINIMUM_CAL_ROUNDSÁMAXIMUM_CAL_ERROR_NSÁMAXIMUM_CAL_TIME_NSÁŠæ Šreset_timebasesÁŠscale_src_to_refÁŠ calibrateÁŠadjust_cal_ratioÁ >æ  î  @scaledÁdelta_as_nanosÁdeltaÁß>Ÿƒ
with_clockÁ¡¥¡impl FnOnce() -> TÁ¡ 
set_recentÁget_nowÁ¦ 
get_recentÁmul_div_po2_u64Á
CounterÁª

¬ƒ
®×
°>ì²_defaultÁµƒ¸×º>MockÁ¼ž
¾×Àƒ0InstantÁÂ
ˆ0 0
ƃ0 0 0
Ê0ÌÖYUpkeepÁÎintervalÁÎclockÁYÑ×YHandleÁÓdoneÁÓhandleÁYÖ×YErrorÁØ
UpkeepRunningÁÙ
ØFailedToSpawnUpkeepThreadÁÛ
ÛˆYÞ×{VarianceÁàÇàmean2Áà¹{ä>CLOCK_OVERRIDEÁæ__rust_std_internal_init_fnÁæ è é__RUST_STD_INTERNAL_VALÁè ëÖ ClockTypeÁíìî
îˆí¥ñ
ñˆññŠíö
öˆù× CalibrationÁûref_timeÁûsrc_timeÁû scale_factorÁû scale_shiftÁ× ƒClockÁinnerÁ
ˆ× Šƒ
&
)
,
?
@
A
B
C
D
I
N
S
S
U
U
W
W
W
k
k
k
m
u
}
~




Œ
Œ

Ž
Ž



˜

š

œ
 
¡
­
¯
¯
¯

¹
¹
¹
¿
¿
¿
Á
Ç
Ë
Ë
Í
Ò
Ò
Ò
×
×
×
ß
ß
ß
ú
ú
ú








تª«¥ ÌÖT—3s%¿c"³"Û²²ì³ã¸3–pZÅίØÓ"Š Ó"¿cÓ"³Ó"­Ö­ÖDurationÁ®ÖsecsÁâ}¯ÖnanosÁâ}Zµ–²ª¿c¼¼½ž
Õ#»'*
Ø$ÛÂÂÃÈĈ _yOjaú¯^ØË$Š Ë$ÐìË$µßË$Ë$Ë$Ä Ë$·#ÙõË$·#ïË$·#œöË$·#ïË$Ë$íßË$Ë$ºË$¿cË$¿cÎÎÏ¡YбY$I NeÛÅ’¿cÓÓÉÔ×YÕãY¬ÔÁwp€E¿cØÙÚÛܣ݈¡_ߪ‰­ÁòÄcŸ'¾Ÿ'Œ"à&³ààÜáÇ{âô{ã¹{ú~îÈ\ä¿cíîïìðˆñò¥óˆôõŠö÷øˆû>3ÄK+ôe¿cûûìüÿýþŸÿ³óE󫡲РÑ)ÛÑ)ØÑ)³Ñ)¿cåòÒ€ÄV•ØÎ*³Î*ØÍ(¬ªµ²À¼ÆÂûŠŸí®ª¸²¾¼VÂÑÎÖÓÞØùíûˆ°ªº²äàû´²Åƒû·²ÈÂû "­ÖÉÂÊÂÌÂEÂHÂJÂOÂMÂRÂTÂjØlØtÓØŸ¿c
1³EÛ#Š Ðì µßÄ Ùõïœö íߺÄc¾Œ"ù-·e

é-·e
¾Ë/Ë/ÉÍ/borrowÁÌ-Î/»Ì-ð…žf+4šÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙÎ*ù-ÕúeèÛ¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ¾. ¾.Ö/±dù,faæ®®£°ò¨it§ÅLS¶¾.á,¢faXèÖ/Ö/ù-ðe
é-ðe
о./5ù-¦®e  éÛ/î0/Ö/ -¿eù-íÔeù-‚!­e  ëÞ2á2ð2#Ö/ -!eM -À$eù-ÛôeèÖ/éÞ2á2ð2åëÞ2á2ð2ŸSô®#500Á
®#10ÁTHHÈ®#$—Hè®#; 8È®#6è®#p®#Œ‘H$žHè®#$ 'è®#J®# ¡HüðG3®#‹H®#®#7?”õ
 ÂÃ%Ë$0®#7>̶ ØÜ%Ÿ'0ßßüà ¬
ÑøÿËO ŸbiLËH íï%Í(0Ó"7><åH íò+Í(6Ó"="DÑ)KR$“I í÷%Í(0†J†JK‰Jµ 7ŠJphantomÁ7J¤7·0ØQdè$çEçEèEGlobalÁ ¿±‡§í#¯ 0Y{„ˆ¡¥¦¨©æíûÀ
AtomicCellÁT³>EÃ"DÎ>­ÖÉ<è>Ë/K÷>†JOnceCellÁD“?¯¥<½?ª
¥«
ìLÆ?²
|€@.$@¼/È<¼@ÂXÈÃXü,è@ØxÉ4ï@Óy4÷@ÎzÜDœAàƒü£åü2/ Performant cross-platform timing with goodies.Á3úü7c` `quanta` provides a simple and fast API for measuring the current time and the duration betweenÁü›`] events. It does this by providing a thin layer on top of native OS timing functions, or, ifÁüüIF available, using the Time Stamp Counter feature found on modern CPUs.ÁÆú # DesignÁ×úüÛda Internally, `quanta` maintains the concept of two potential clock sources: a reference clock andÁœÀ a source clock.ÁÔúüØa^ The reference clock is provided by the OS, and always available. It is equivalent to what isÁüºda provided by the standard library in terms of the underlying system calls being made. As it usesÁüŸa^ the native timing facilities provided by the operating system, we ultimately depend on the OSÁü1. itself to give us a stable and correct value.Á³úü·_\ The source clock is a potential clock source based on the [Time Stamp Counter][tsc] featureÁü—`] found on modern CPUs. If the TSC feature is not present or is not reliable enough, `quanta`Áüø;8 will transparently utilize the reference clock instead.Á´úü¸]Z Depending on the underlying processor(s) in the system, `quanta` will figure out the mostÁü– c` accurate/efficient way to calibrate the source clock to the reference clock in order to provideÁüú +( measurements scaled to wall clock time.Á¦
úüª
@= Details on TSC support, and calibration, are detailed below.Áë
ú
 # FeaturesÁþ
úü‚ ^[ Beyond simply taking measurements of the current time, `quanta` provides features for moreÁüá UR easily working with clocks, as well as being able to enhance performance further:Áü· '$ - `Clock` can be mocked for testingÁüß ?< - globally accessible "recent" time with amortized overheadÁŸ
ú”£
 ## Mocked timeÁ
úüº
[X For any code that uses a `Clock`, a mocked version can be substituted. This allows forÁü–a^ application authors to control the time in tests, which allows simulating not only the normalÁüøa^ passage of time but provides the ability to warp time forwards and backwards in order to testÁüÚb_ corner cases in logic, etc. Creating a mocked clock can be acheived with [`Clock::mock`], andÁü½1. [`Mock`] contains more details on mock usage.Áïúüó(% ## Coarsely-updated, or recent, timeÁœúü c` `quanta` also provides a "recent" time feature, which allows a slightly-delayed version of timeÁü„b_ to be provided to callers, trading accuracy for speed of access. An upkeep thread is spawned,Áüçb_ which is responsible for taking measurements and updating the global recent time. Callers thenÁüÊda can access the cached value by calling `Clock::recent`. This interface can be 4-10x faster thanÁü¯c` directly calling `Clock::now`, even when TSC support is available. As the upkeep thread is theÁü“da only code updating the recent time, the accuracy of the value given to callers is limited by howÁüø^[ often the upkeep thread updates the time, thus the trade off between accuracy and speed ofÁ\× access.Áãúœç # Feature FlagsÁûúüÿ_\ `quanta` comes with feature flags that enable convenient conversions to time types in otherÁäß popular crates, such as:ÁüüYV - `prost` - provides an implementation into [`Timestamp`][prost_types_timestamp] fromÁœÖ `prost_types`Áêú´î # Platform SupportÁúü‰^[ At a high level, `quanta` carries support for most major operating systems out of the box:ÁüèDA - Windows ([`QueryPerformanceCounter`][QueryPerformanceCounter])Áü­A> - macOS/OS X/iOS ([`mach_absolute_time`][mach_absolute_time])Áüï;8 - Linux/*BSD/Solaris ([`clock_gettime`][clock_gettime])Á«úü¯`] These platforms are supported in the "reference" clock sense, and support for using the TimeÁüGD Stamp Counter as a clocksource is more subtle, and explained below.ÁØúœÜ ## WASM supportÁðúüô_\ This library can be built for WASM targets, but in this case the resolution and accuracy ofÁüÔ[X measurements can be limited by the WASM environment. In particular, when running on theÁü°`] `wasm32-unknown-unknown` target in browsers, `quanta` will use [window.performance.now] as aÁü‘`] clock. This mean the accuracy is limited to milliseconds instead of the usual nanoseconds onÁüòa^ other targets. When running within a WASI environment (target `wasm32-wasi`), the accuracy ofÁüÔ /, the clock depends on the VM implementation.Á„!úŒˆ! # TSC SupportÁš!úüž!WT Accessing the TSC requires being on the `x86_64` architecture, with access to SSE2.Áüö!da Additionally, the processor must support either constant or nonstop/invariant TSC. This ensuresÁüÛ"EB that the TSC ticks at a constant rate which can be easily scaled.Á¡#úü¥#b_ A caveat is that "constant" TSC doesn't account for all possible power states (levels of powerÁüˆ$a^ down or sleep that a CPU can enter to save power under light load, etc) and so a constant TSCÁüê$]Z can lead to drift in measurements over time, after they've been scaled to reference time.ÁÈ%úüÌ%c` This is a limitation of the TSC mode, as well as the nature of `quanta` not being able to know,Áü°&[X as the OS would, when a power state transition has
# CaveatsÁŸ4úü£4b_ Utilizing the TSC can be a tricky affair, and so here is a list of caveats that may or may notÁü†5'$ apply, and is in no way exhaustive:Áü®5'$ - CPU hotplug behavior is undefinedÁôÖ5 - raw values may time warpÁüõ5WT - measurements from the TSC may drift past or behind the comparable reference clockÁÍ6úüÑ6a^ Another important caveat is that `quanta` does not track time across system suspends. SimplyÁü³7b_ put, if a time measurement (such as using [`Instant::now`][crate::Instant::now]) is taken, andÁü–8_\ then the system is suspended, and then another measurement is taken, the difference betweenÁüö8GD those the two would not include the time the system was in suspend.Á¾9úüÂ9;8 [tsc]: https://en.wikipedia.org/wiki/Time_Stamp_CounterÁüþ9^[ [QueryPerformanceCounter]: https://msdn.microsoft.com/en-us/library/ms644904(v=VS.85).aspxÁüÝ:eb [mach_absolute_time]: https://developer.apple.com/documentation/kernel/1462446-mach_absolute_timeÁüÃ;>; [clock_gettime]: https://linux.die.net/man/3/clock_gettimeÁü‚<`] [prost_types_timestamp]: https://docs.rs/prost-types/0.7.0/prost_types/struct.Timestamp.htmlÁüã<^[ [window.performance.now]: https://developer.mozilla.org/en-US/docs/Web/API/Performance/nowÁ 0Y{„ˆ¡¥¦¨©æíûÀž;ªEÃ"¼­ÖÉÐË/Kâ†Jó;ý¯¥ª
¥«
ì<²
U.e¼/ÈvÂXÈvÃXüšØxÉ«Óy¼ÎzÜÍàƒüš>#ªœÃ>¼Ü>lâ>ÐLñ>âÌ‚?ýTž?4¢?
¥<$ª
¥«
ìLV²\< ª«ì¼âüÜ’" ÄŒ Œ"®#  š
$´¸l.L2 ì²D€úâ¬Îì×´åüÍ/üÉ4üÀ?$„²tSÓ"¼Ó"®#
¬Ò›ÔEGd®?<<lÒ?LÖ?üŒ$ì¼ÙúÙ
ŒöœõüØ1üÏ<œ“
Dá?$å?¼ž;T EK9 †JÃ"DD ­Öü# 6- L3 .t> !̤ üPA > Type which can be converted into a nanosecond representation.Á úü–O L This allows users of [`Mock`] to increment/decrement the time both with rawÁüæ= : integer values and the more convenient [`Duration`] type.Á Îìü¤ˆ ··Ü üÄF C Consumes this value, converting it to a nanosecond representation.ÁT ¿®#
¿$ ä® ®#!!ÔÑ ®#®# 
! ü„! ·###Ô¬ ·#®#""
#$%&),Üà î $$$
%ü… 6 üÔ
, ) Increments the time by the given amount.ÁLŒ  $Ÿð2$Ÿ'' ª $ÍìÝ“ Ý“|™
&Ý“ amountÁ4± 02L &<closure_kind>Á(<closure_signature>Á(<upvars>Á((&(Ý“®#Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ®# ®#ü©
6 üø , ) Decrements the time by the given amount.ÁL°
Ž Ž$Ý“ð2$Ÿ** Î
$…” º
–”
)Ý“
µ“
$& )ë“+ƒ”+ ”++)+ݓǕ™–ÔË üœ* ' Gets the current value of this `Mock`.Á,Ò  $®#$ Ø $
, Tó?UUee\˜@<œ@Âíº02­¿02®D¿ß03³Tíß04³Ä04×4¤,05AddÁHÄ 07 AddAssignÁLMÙõ08SubÁXï09 SubAssignÁL]œö0:Ã"Dx­Ö0;DäæÄƵ·D/—D=pr^`FHœm:dš Ë$=>?@ABCD¼Îü­ 41 Gets the current time, scaled to reference time.Áæ úüî [X This method depends on a lazily initialized global clock, which can take up to 200ms toÁüÎ $! initialize and calibrate itself.Á÷ úüÿ b_ This method is the spiritual equivalent of [`Instant::now`][instant_now]. It is guaranteed toÁüæ
,) return a monotonically increasing value.ÁúüŸ*' [instant_now]: std::time::Instant::nowÁÕË$<<
=ÔëüŒ@= Gets the most recent current time, scaled to reference time.ÁÑúüÙ_\ This method provides ultra-low-overhead access to a slightly-delayed version of the currentÁü½^[ time. Instead of querying the underlying source clock directly, a shared, global value isÁü >; read directly without the need to scale to reference time.Áãúüëda The value is updated by running an "upkeep" thread or by calling [`set_recent`][set_recent]. AnÁüÔGD upkeep thread can be configured and spawned via [`Upkeep`][upkeep].Á úü¨ZW If the upkeep thread has not been started, or no value has been set manually, a lazilyÁü‡]Z initialized global clock will be used to get the current time. This clock can take up toÁüé-* 200ms to initialize and calibrate itself.Áúü£# [set_recent]: crate::set_recentÁÜË [upkeep]: crate::UpkeepÁ4òË$<<
>üŸ:ü¯HE Returns the amount of time elapsed from another instant to this one.Áüúd„ # PanicsÁúü\Y Previous versions of this method panicked when earlier was later than `self`. Currently,ÁüþTQ this method saturates to zero. Future versions may reintroduce the panic in someÁü×&# circumstances. See [Monotonicity].ÁúüŠ(% [Monotonicity]: Instant#monotonicityÁ·út¿ # ExamplesÁÒú
```no_runÁ´ì use quanta::Clock;Áä‡ use std::time::Duration;Áܨ use std::thread::sleep;ÁÈúüÐ! let mut clock = Clock::new();ÁÔö let now = clock.now();Áü• sleep(Duration::new(1, 0));Áô¹ let new_now = clock.now();ÁüÜ2/ println!("{:?}", new_now.duration_since(now));Á<“ ```Át¦ Ë$Ë$·#< µ<
?earlierÁ<¼ü³#Jü¨ZW Returns the amount of time elapsed from another instant to this one, or `None` if thatÁü‡%" instant is earlier than this one.Á±úü¹]Z Due to [monotonicity bugs], even under correct logical ordering of the passed `Instant`s,Áü›" this method can return `None`.ÁÂúüÊ-* [monotonicity bugs]: Instant#monotonicityÁüút„ ±ªúÔª´± êªäÌ ‰«Üí ®«!úü•!!߫Ի!‰¬üÚ!­¬ôþ!Õ¬ü¡":7 println!("{:?}", new_now.checked_duration_since(now));Áüà"B? println!("{:?}", now.checked_duration_since(new_now)); // NoneÁ<§#¸­´º# Ë$Ë$Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙ·#< Ñ#<
@$Ò#®<Ø#üâ*EüË$\Y Returns the amount of time elapsed from another instant to this one, or zero duration ifÁü¬%*' that instant is earlier than this one.ÁÛ%úüã%]ɯüÅ&"°°ì&úüô&-è°¦'út®'±ªÁ'úlÉ'Ôª´Û'êªäö'‰«Ü—(®«·(úü¿(!ß«Ôå(‰¬ü„)­¬ô¨)Õ¬üË)=: println!("{:?}", new_now.saturating_duration_since(now));Áü*DA println!("{:?}", now.saturating_duration_since(new_now)); // 0nsÁ<Ö*¸­Ìé* Ë$Ë$·#< ƒ+<
A$„+®<Š+üà1!üö+FC Returns the amount of time elapsed since this instant was created.ÁÁ,údÉ,Ò§Ú,úüâ,_\ Previous `quanta` versions panicked when the current time was earlier than self. CurrentlyÁüÆ-]Z this method returns a Duration of zero in that case. Future versions may reintroduce theÁô¨. panic. See [Monotonicity].ÁË.úüÓ.(ô©€/útˆ/±ª›/úl£/Ôª´µ/êªäÐ/‰«Üñ/®«‘0úü™0!߫Կ0‰¬üÞ0­¬ü‚1  let elapsed = now.elapsed();Áü§1(% println!("{:?}", elapsed); // ≥ 1sÁ<Ô1¸­<ç1 Ë$·#< ï1<
B$ð1ü€4@ü®2ZW Returns `Some(t)` where `t` is the time `self + duration` if `t` can be represented asÁü3[X `Instant` (which means it's inside the bounds of the underlying data structure), `None`Átí3 otherwise.Á\‡4 Ë$·#Û¼ݼÞ¼©ß¼à¼ÛἈcSñŸ«‡zÙË$< “4<
C$”4durationÁDš4ü™7@üÇ5ZW Returns `Some(t)` where `t` is the time `self - duration` if `t` can be represented asÁü¦6[œÀt†7€Á\ 7 Ë$·#ºÂ< ¬7<
D$­7¡ÂD³7ôÞ8Ë$FGÆ Ç G\ƒ94ˆ9EEË$üñ:(dŸ9Ò§°9úü¸9WT This function may panic if the resulting point in time cannot be represented by theÁü”:XU underlying data structure. See [`Instant::checked_add`] for a version without panic.Áô:Ë$·#Ë$EE
G$ø:¹
,þ:ü…<$Ë$IÛõIü°<)T³< Ë$·#ð2H ¾<H
I$Ã<¹
,É<ôÚ=Ë$KLïïL\ÿ=4„>JJË$ü›>(ž>Ë$·#Ë$JJ