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


Java U.heapSize方法代码示例

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


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

示例1: testTopologyHeapSizeInOneJvm

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * @throws Exception If failed.
 */
public void testTopologyHeapSizeInOneJvm() throws Exception {
    try {
        ClusterNode node1 = startGrid(1).cluster().node();
        ClusterNode node2 = startGrid(2).cluster().node();

        double allSize = U.heapSize(F.asList(node1, node2), 10);

        double size1 = U.heapSize(node1, 10);

        assertEquals(size1, allSize, 1E-5);
    }
    finally {
        stopAllGrids();
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:19,代码来源:GridTopologyHeapSizeSelfTest.java

示例2: testTopologyHeapSizeForNodesWithDifferentPids

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** */
public void testTopologyHeapSizeForNodesWithDifferentPids() {
    GridTestNode node1 = getNode("123456789ABC", 1000);
    GridTestNode node2 = getNode("123456789ABC", 1001);

    double size1 = U.heapSize(node1, 10);
    double size2 = U.heapSize(node2, 10);

    double allSize = U.heapSize(F.asList((ClusterNode)node1, node2), 10);

    assertEquals(size1 + size2, allSize, 1E-5);
}
 
开发者ID:apache,项目名称:ignite,代码行数:13,代码来源:GridTopologyHeapSizeSelfTest.java

示例3: testTopologyHeapSizeForNodesWithDifferentMacs

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/** */
public void testTopologyHeapSizeForNodesWithDifferentMacs() {
    GridTestNode node1 = getNode("123456789ABC", 1000);
    GridTestNode node2 = getNode("CBA987654321", 1000);

    double size1 = U.heapSize(node1, 10);
    double size2 = U.heapSize(node2, 10);

    double allSize = U.heapSize(F.asList((ClusterNode)node1, node2), 10);

    assertEquals(size1 + size2, allSize, 1E-5);
}
 
开发者ID:apache,项目名称:ignite,代码行数:13,代码来源:GridTopologyHeapSizeSelfTest.java

示例4: ackStart

import org.apache.ignite.internal.util.typedef.internal.U; //导入方法依赖的package包/类
/**
 * Prints start info.
 *
 * @param rtBean Java runtime bean.
 */
private void ackStart(RuntimeMXBean rtBean) {
    ClusterNode locNode = localNode();

    if (log.isQuiet()) {
        U.quiet(false, "");
        U.quiet(false, "Ignite node started OK (id=" + U.id8(locNode.id()) +
            (F.isEmpty(igniteInstanceName) ? "" : ", instance name=" + igniteInstanceName) + ')');
    }

    if (log.isInfoEnabled()) {
        log.info("");

        String ack = "Ignite ver. " + VER_STR + '#' + BUILD_TSTAMP_STR + "-sha1:" + REV_HASH_STR;

        String dash = U.dash(ack.length());

        SB sb = new SB();

        for (GridPortRecord rec : ctx.ports().records())
            sb.a(rec.protocol()).a(":").a(rec.port()).a(" ");

        String str =
            NL + NL +
                ">>> " + dash + NL +
                ">>> " + ack + NL +
                ">>> " + dash + NL +
                ">>> OS name: " + U.osString() + NL +
                ">>> CPU(s): " + locNode.metrics().getTotalCpus() + NL +
                ">>> Heap: " + U.heapSize(locNode, 2) + "GB" + NL +
                ">>> VM name: " + rtBean.getName() + NL +
                (igniteInstanceName == null ? "" : ">>> Ignite instance name: " + igniteInstanceName + NL) +
                ">>> Local node [" +
                "ID=" + locNode.id().toString().toUpperCase() +
                ", order=" + locNode.order() + ", clientMode=" + ctx.clientNode() +
                "]" + NL +
                ">>> Local node addresses: " + U.addressesAsString(locNode) + NL +
                ">>> Local ports: " + sb + NL;

        log.info(str);
    }
}
 
开发者ID:apache,项目名称:ignite,代码行数:47,代码来源:IgniteKernal.java


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