LCOV - code coverage report
Current view: top level - legacy/ascend950/framework/service - notify_timeout_cfg.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 83.3 % 6 5
Test Date: 2026-08-18 17:47:01 Functions: 66.7 % 3 2

            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              : #ifndef HCCLV2_NOTIFY_TIMEOUT_CFG_H
      12              : #define HCCLV2_NOTIFY_TIMEOUT_CFG_H
      13              : 
      14              : #include "types.h"
      15              : #include "env_config/env_config_v2.h"
      16              : 
      17              : namespace Hccl {
      18              : class NotifyTimeoutCfg {
      19              : public:
      20              :     static constexpr Timeout NOTIFY_DEFAULT_WAIT_TIME = 27 * 68;
      21              :     static constexpr Timeout NOTIFY_MAX_WAIT_TIME = 255 * 68;
      22              : 
      23           39 :     void Init()
      24              :     {
      25           39 :         notifyTimeout = EnvConfig::GetInstance().GetRtsConfig().GetExecTimeOut();
      26          117 :         HCCL_INFO("[NotifyTimeoutCfg][Init] set notifyTimeout[%u]s", notifyTimeout);
      27           39 :     }
      28              : 
      29            0 :     Timeout GetBarrierTimeout() const { return barrierTimeout; }
      30              : 
      31           35 :     Timeout GetNotifyTimeout() const { return notifyTimeout; }
      32              : 
      33              : private:
      34              :     Timeout barrierTimeout{NOTIFY_MAX_WAIT_TIME};
      35              :     Timeout notifyTimeout{NOTIFY_DEFAULT_WAIT_TIME};
      36              : };
      37              : 
      38              : } // namespace Hccl
      39              : 
      40              : #endif // HCCLV2_NOTIFY_TIMEOUT_CFG_H
        

Generated by: LCOV version 2.0-1