mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-03-06 03:28:12 +00:00

- Remove TrackingField and replace it with a Metric abstract class. This has two concrete subclasses - Counter and Event. Events carry an additional piece of data each time it is observed, such as HTTP response size. - Computers now accept a MetricsObserver, which tracks metrics for this particular computer. This allows us to decouple Computer classes and metrics information. The concrete MetricsObserver class we use within Minecraft exposes the ServerComputer directly, so we no longer need to do the awkward mapping and lookups! - The /computercraft command can now do aggregates (count, avg, max) over all Event metrics. This removes the need for special handling of computer and server time. There's also a small number of changes in removing the coupling between Computer and some of its dependencies (ILuaMachine, MainThreadExecutor). This makes some future refactorings easier, I promise!