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


C++ phpret::set方法代码示例

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


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

示例1: returnVals

void Profiler::returnVals(phpret& ret, const Name& name, const Counts& counts,
                          int flags, int64_t MHz)
{
    ArrayInit arr(5, ArrayInit::Map{});
    arr.set(s_ct,  counts.count);
    arr.set(s_wt,  to_usec(counts.wall_time, MHz));
    if (flags & TrackCPU) {
      arr.set(s_cpu, to_usec(counts.cpu, MHz, true));
    }
    if (flags & TrackMemory) {
      arr.set(s_mu,  counts.memory);
      arr.set(s_pmu, counts.peak_memory);
    } else if (flags & TrackMalloc) {
      arr.set(s_alloc, counts.memory);
      arr.set(s_free, counts.peak_memory);
    }
    ret.set(String(name), arr.toArray());
}
开发者ID:XBS-Nathan,项目名称:hhvm,代码行数:18,代码来源:ext_hotprofiler.cpp

示例2: returnVals

 static void returnVals(phpret& ret, const Name& name, const Counts& counts,
                 int flags, int64 MHz)
 {
   Array arr;
   arr.set("ct",  counts.count);
   arr.set("wt",  to_usec(counts.wall_time, MHz));
   if (flags & TrackCPU) {
     arr.set("cpu", to_usec(counts.cpu, MHz));
   }
   if (flags & TrackMemory) {
     arr.set("mu",  counts.memory);
     arr.set("pmu", counts.peak_memory);
   } else if (flags & TrackMalloc) {
     arr.set("alloc", counts.memory);
     arr.set("free", counts.peak_memory);
   }
   ret.set(String(name), arr);
 }
开发者ID:oxromantic,项目名称:hiphop-php,代码行数:18,代码来源:ext_hotprofiler.cpp


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