ai2cm / pace

Implementation of the FV3GFS / SHiELD atmospheric model in Python
https://ai2cm.github.io/pace/
Apache License 2.0
37 stars 12 forks source link

Performance config makes performance collector class #361

Closed elynnwu closed 2 years ago

elynnwu commented 2 years ago

PerformanceConfig should build a PerformanceCollector class, where it contains timer, info per step, and profiler. And PerformanceCollector is not an attribute to PerformanceConfig, could be either a property or off a build method. This will also mitigate having to do things like if self.performance_mode and

        # TODO: these attributes are popped because they're not really config,
        # we should move them off of config classes and onto non-config classes.
        config_dict["performance_config"].pop("times_per_step", None)
        config_dict["performance_config"].pop("hits_per_step", None)
        config_dict["performance_config"].pop("timestep_timer", None)
        config_dict["performance_config"].pop("total_timer", None)