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-18 17:47:01 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              : 
      11              : #include "env_config_v2.h"
      12              : 
      13              : namespace Hccl {
      14              : 
      15            8 : EnvConfig::EnvConfig() { Parse(); }
      16              : 
      17         1664 : EnvConfig& EnvConfig::GetInstance()
      18              : {
      19         1664 :     static EnvConfig envConfig;
      20         1664 :     return envConfig;
      21              : }
      22              : 
      23           15 : void EnvConfig::Parse()
      24              : {
      25           15 :     hostNicCfg.Parse();
      26           15 :     socketCfg.Parse();
      27           15 :     rtsCfg.Parse();
      28           15 :     rdmaCfg.Parse();
      29           15 :     algoCfg.Parse();
      30           15 :     logCfg.Parse();
      31           15 :     detourCfg.Parse();
      32           15 :     plfDebugCfg.Parse();
      33           15 : }
      34              : 
      35          116 : const EnvHostNicConfig& EnvConfig::GetHostNicConfig() { return hostNicCfg; }
      36              : 
      37           67 : const EnvSocketConfig& EnvConfig::GetSocketConfig() { return socketCfg; }
      38              : 
      39          238 : const EnvRtsConfig& EnvConfig::GetRtsConfig() { return rtsCfg; }
      40              : 
      41          313 : const EnvRdmaConfig& EnvConfig::GetRdmaConfig() { return rdmaCfg; }
      42              : 
      43           26 : const EnvAlgoConfig& EnvConfig::GetAlgoConfig() { return algoCfg; }
      44              : 
      45          349 : const EnvLogConfig& EnvConfig::GetLogConfig() { return logCfg; }
      46              : 
      47          245 : const EnvDetourConfig& EnvConfig::GetDetourConfig() { return detourCfg; }
      48              : 
      49          178 : const EnvPlfDebugConfig& EnvConfig::GetPlfDebugConfig() { return plfDebugCfg; }
      50              : 
      51              : } // namespace Hccl
        

Generated by: LCOV version 2.0-1