当前位置: 首页>>代码示例>>C++>>正文


C++ PCM::getMCChannelsPerSocket方法代码示例

本文整理汇总了C++中PCM::getMCChannelsPerSocket方法的典型用法代码示例。如果您正苦于以下问题:C++ PCM::getMCChannelsPerSocket方法的具体用法?C++ PCM::getMCChannelsPerSocket怎么用?C++ PCM::getMCChannelsPerSocket使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PCM的用法示例。


在下文中一共展示了PCM::getMCChannelsPerSocket方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main


//.........这里部分代码省略.........
    {
      std::cout << "----------------------------------------------------------------------------------------------"<<std::endl;
      
	  #ifdef _MSC_VER
	  int delay_ms = delay * 1000;
	  // compensate slow Windows console output
	  if(AfterTime) delay_ms -= (int)(m->getTickCount() - BeforeTime);
	  if(delay_ms < 0) delay_ms = 0;
      #else
	  int delay_ms = delay * 1000;
      #endif

	  if(ext_program)
		MySystem(ext_program);
	  else
		MySleepMs(delay_ms);

	  AfterTime = m->getTickCount();
      for(i=0; i<m->getNumSockets(); ++i)
        AfterState[i] = m->getServerUncorePowerState(i);
     
	  std::cout << "Time elapsed: "<<AfterTime-BeforeTime<<" ms\n";
	  std::cout << "Called sleep function for "<<delay_ms<<" ms\n";
      for(uint32 socket=0;socket<m->getNumSockets();++socket)
      {
	for(uint32 port=0;port<m->getQPILinksPerSocket();++port)
	{
	  std::cout << "S"<<socket<<"P"<<port
	    << "; QPIClocks: "<< getQPIClocks(port,BeforeState[socket],AfterState[socket])
	    << "; L0p Tx Cycles: "<< 100.*getNormalizedQPIL0pTxCycles(port,BeforeState[socket],AfterState[socket])<< "%"
	    << "; L1 Cycles: "    << 100.*getNormalizedQPIL1Cycles(port,BeforeState[socket],AfterState[socket])<< "%"
	    << "\n";
	}
	for(uint32 channel=0;channel<m->getMCChannelsPerSocket();++channel)
	{
	  if(imc_profile <= 3 && imc_profile >= 0)
	  {
              std::cout << "S"<<socket<<"CH"<<channel <<"; DRAMClocks: "<< getDRAMClocks(channel,BeforeState[socket],AfterState[socket])
                 << "; Rank"<<getFirstRank(imc_profile)<<" CKE Off Residency: "<< std::setw(3) << 
				100.*getCKEOffResidency(channel,getFirstRank(imc_profile),BeforeState[socket],AfterState[socket])<<"%"
		<< "; Rank"<<getFirstRank(imc_profile)<<" CKE Off Average Cycles: "<< 
				getCKEOffAverageCycles(channel,getFirstRank(imc_profile),BeforeState[socket],AfterState[socket])
		<< "; Rank"<<getFirstRank(imc_profile)<<" Cycles per transition: "<< 
				getCyclesPerTransition(channel,getFirstRank(imc_profile),BeforeState[socket],AfterState[socket])
                << "\n";

              std::cout << "S"<<socket<<"CH"<<channel <<"; DRAMClocks: "<< getDRAMClocks(channel,BeforeState[socket],AfterState[socket])
                << "; Rank"<<getSecondRank(imc_profile)<<" CKE Off Residency: "<< std::setw(3) <<
			100.*getCKEOffResidency(channel,getSecondRank(imc_profile),BeforeState[socket],AfterState[socket])<<"%"
                << "; Rank"<<getSecondRank(imc_profile)<<" CKE Off Average Cycles: "<< 
			getCKEOffAverageCycles(channel,getSecondRank(imc_profile),BeforeState[socket],AfterState[socket])
                << "; Rank"<<getSecondRank(imc_profile)<<" Cycles per transition: "<< 
			getCyclesPerTransition(channel,getSecondRank(imc_profile),BeforeState[socket],AfterState[socket])
                << "\n";

               
	  } else if(imc_profile == 4)
	  {
	      std::cout << "S"<<socket<<"CH"<<channel
		<< "; DRAMClocks: "<< getDRAMClocks(channel,BeforeState[socket],AfterState[socket])
		<< "; Self-refresh cycles: "<< getSelfRefreshCycles(channel,BeforeState[socket],AfterState[socket])
		<< "; Self-refresh transitions: "<< getSelfRefreshTransitions(channel,BeforeState[socket],AfterState[socket])
		<< "\n";
	  }
	}
	    switch(pcu_profile)
开发者ID:PennPanda,项目名称:linux-repo,代码行数:67,代码来源:pcm-power.cpp


注:本文中的PCM::getMCChannelsPerSocket方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。