LCOV - code coverage report
Current view: top level - legacy/ascend950/framework/env_config - env_config.cc (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 22 22
Test Date: 2026-08-17 10:19:35 Functions: 100.0 % 11 11

            Line data    Source code
       1              : /**
       2              :  * Copyright (c) 2025 Huawei Technologies Co., Ltd.
       3              :  * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
       4              :  * CANN Open Software License Agreement Version 2.0 (the "License").
       5              :  * Please refer to the License for details. You may not use this file except in compliance with the License.
       6              :  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
       7              :  * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
       8              :  * See LICENSE in the root of the software repository for the full text of the License.
       9              :  */
      10              : #include "env_config_v2.h"
      11              : 
      12              : namespace Hccl {
      13              : 
      14            8 : EnvConfig::EnvConfig() { Parse(); }
      15              : 
      16         1646 : EnvConfig& EnvConfig::GetInstance()
      17              : {
      18         1646 :     static EnvConfig envConfig;
      19         1646 :     return envConfig;
      20              : }
      21              : 
      22           15 : void EnvConfig::Parse()
      23              : {
      24           15 :     hostNicCfg.Parse();
      25           15 :     socketCfg.Parse();
      26           15 :     rtsCfg.Parse();
      27           15 :     rdmaCfg.Parse();
      28           15 :     algoCfg.Parse();
      29           15 :     logCfg.Parse();
      30           15 :     detourCfg.Parse();
      31           15 :     plfDebugCfg.Parse();
      32           15 : }
      33              : 
      34          100 : const EnvHostNicConfig& EnvConfig::GetHostNicConfig() { return hostNicCfg; }
      35              : 
      36           67 : const EnvSocketConfig& EnvConfig::GetSocketConfig() { return socketCfg; }
      37              : 
      38          238 : const EnvRtsConfig& EnvConfig::GetRtsConfig() { return rtsCfg; }
      39              : 
      40          313 : const EnvRdmaConfig& EnvConfig::GetRdmaConfig() { return rdmaCfg; }
      41              : 
      42           26 : const EnvAlgoConfig& EnvConfig::GetAlgoConfig() { return algoCfg; }
      43              : 
      44          349 : const EnvLogConfig& EnvConfig::GetLogConfig() { return logCfg; }
      45              : 
      46          245 : const EnvDetourConfig& EnvConfig::GetDetourConfig() { return detourCfg; }
      47              : 
      48          178 : const EnvPlfDebugConfig& EnvConfig::GetPlfDebugConfig() { return plfDebugCfg; }
      49              : 
      50              : } // namespace Hccl
        

Generated by: LCOV version 2.0-1