首页 > 编程语言 >Node.js 异步程序运行结果及分析

Node.js 异步程序运行结果及分析

时间:2022-11-23 10:38:39浏览次数:68  
标签:Node 11 14 程序运行 Stop js Start 23T02 every

源程序见: https://www.cnblogs.com/fitmap/p/16915027.html

运行结果:

2022-11-23T02:14:04.688Z Start main
2022-11-23T02:14:04.690Z Start promise main
2022-11-23T02:14:04.690Z Start prepare
2022-11-23T02:14:04.690Z Start promise every_0
2022-11-23T02:14:04.691Z Stop promise every_0 0.1042ms
2022-11-23T02:14:04.691Z Start promise every_1
2022-11-23T02:14:04.691Z Stop promise every_1 0.0054ms
2022-11-23T02:14:04.691Z Start promise every_2
2022-11-23T02:14:04.691Z Stop promise every_2 0.0036ms
2022-11-23T02:14:04.691Z Start promise every_3
2022-11-23T02:14:04.691Z Stop promise every_3 0.0107ms
2022-11-23T02:14:04.691Z Start promise every_4
2022-11-23T02:14:04.691Z Stop promise every_4 0.0038ms
2022-11-23T02:14:04.691Z Start promise every_5
2022-11-23T02:14:04.691Z Stop promise every_5 0.0072ms
2022-11-23T02:14:04.692Z Start promise every_6
2022-11-23T02:14:04.692Z Stop promise every_6 0.005ms
2022-11-23T02:14:04.692Z Start promise every_7
2022-11-23T02:14:04.692Z Stop promise every_7 0.004ms
2022-11-23T02:14:04.692Z Start promise every_8
2022-11-23T02:14:04.692Z Stop promise every_8 0.004ms
2022-11-23T02:14:04.692Z Start promise every_9
2022-11-23T02:14:04.692Z Stop promise every_9 0.011ms
2022-11-23T02:14:04.692Z Stop prepare 1.6465ms
2022-11-23T02:14:04.692Z Start every
2022-11-23T02:14:04.692Z Start await every_0
2022-11-23T02:14:04.692Z Start prepare
2022-11-23T02:14:04.692Z Start promise unify_0
2022-11-23T02:14:04.692Z Stop promise unify_0 0.0033ms
2022-11-23T02:14:04.692Z Start promise unify_1
2022-11-23T02:14:04.693Z Stop promise unify_1 0.0033ms
2022-11-23T02:14:04.693Z Start promise unify_2
2022-11-23T02:14:04.693Z Stop promise unify_2 0.0025ms
2022-11-23T02:14:04.693Z Start promise unify_3
2022-11-23T02:14:04.693Z Stop promise unify_3 0.0022ms
2022-11-23T02:14:04.693Z Start promise unify_4
2022-11-23T02:14:04.693Z Stop promise unify_4 0.0022ms
2022-11-23T02:14:04.693Z Start promise unify_5
2022-11-23T02:14:04.693Z Stop promise unify_5 0.0051ms
2022-11-23T02:14:04.693Z Start promise unify_6
2022-11-23T02:14:04.693Z Stop promise unify_6 0.0063ms
2022-11-23T02:14:04.693Z Start promise unify_7
2022-11-23T02:14:04.693Z Stop promise unify_7 0.0023ms
2022-11-23T02:14:04.693Z Start promise unify_8
2022-11-23T02:14:04.693Z Stop promise unify_8 0.0026ms
2022-11-23T02:14:04.693Z Start promise unify_9
2022-11-23T02:14:04.693Z Stop promise unify_9 0.0025ms
2022-11-23T02:14:04.693Z Stop prepare 0.7488ms
2022-11-23T02:14:04.693Z Start await unify
2022-11-23T02:14:04.693Z Stop promise main 3.0417ms
2022-11-23T02:14:04.693Z Start await main
2022-11-23T02:14:04.694Z Start busy_every_0
2022-11-23T02:14:04.704Z Stop busy_every_0 9.5699ms result=3671
2022-11-23T02:14:04.704Z Start busy_every_1
2022-11-23T02:14:04.713Z Stop busy_every_1 9.2686ms result=3640
2022-11-23T02:14:04.724Z Start busy_every_2
2022-11-23T02:14:04.728Z Stop busy_every_2 4.2771ms result=3666
2022-11-23T02:14:04.728Z Start busy_every_3
2022-11-23T02:14:04.733Z Stop busy_every_3 4.8357ms result=3662
2022-11-23T02:14:04.733Z Start busy_every_4
2022-11-23T02:14:04.738Z Stop busy_every_4 4.3268ms result=3691
2022-11-23T02:14:04.738Z Start busy_every_5
2022-11-23T02:14:04.742Z Stop busy_every_5 4.6036ms result=3643
2022-11-23T02:14:04.743Z Start busy_every_6
2022-11-23T02:14:04.747Z Stop busy_every_6 4.5553ms result=3717
2022-11-23T02:14:04.747Z Start busy_every_7
2022-11-23T02:14:04.752Z Stop busy_every_7 4.3657ms result=3640
2022-11-23T02:14:04.752Z Start busy_every_8
2022-11-23T02:14:04.756Z Stop busy_every_8 4.4664ms result=3696
2022-11-23T02:14:04.756Z Start busy_every_9
2022-11-23T02:14:04.760Z Stop busy_every_9 4.124ms result=3746
2022-11-23T02:14:04.760Z Start busy_unify_0
2022-11-23T02:14:04.765Z Stop busy_unify_0 4.6891ms result=3621
2022-11-23T02:14:04.765Z Start busy_unify_1
2022-11-23T02:14:04.770Z Stop busy_unify_1 4.4502ms result=3686
2022-11-23T02:14:04.770Z Start busy_unify_2
2022-11-23T02:14:04.774Z Stop busy_unify_2 4.0361ms result=3669
2022-11-23T02:14:04.774Z Start busy_unify_3
2022-11-23T02:14:04.778Z Stop busy_unify_3 4.4638ms result=3694
2022-11-23T02:14:04.778Z Start busy_unify_4
2022-11-23T02:14:04.783Z Stop busy_unify_4 4.2759ms result=3623
2022-11-23T02:14:04.783Z Start busy_unify_5
2022-11-23T02:14:04.787Z Stop busy_unify_5 4.1593ms result=3687
2022-11-23T02:14:04.787Z Start busy_unify_6
2022-11-23T02:14:04.791Z Stop busy_unify_6 4.1181ms result=3746
2022-11-23T02:14:04.791Z Start busy_unify_7
2022-11-23T02:14:04.796Z Stop busy_unify_7 4.7875ms result=3721
2022-11-23T02:14:04.796Z Start busy_unify_8
2022-11-23T02:14:04.800Z Stop busy_unify_8 4.2299ms result=3730
2022-11-23T02:14:04.800Z Start busy_unify_9
2022-11-23T02:14:04.805Z Stop busy_unify_9 4.0764ms result=3716
2022-11-23T02:14:04.805Z Stop await every_0 112.422ms
2022-11-23T02:14:04.805Z Start await every_1
2022-11-23T02:14:04.805Z Stop await every_1 0.0152ms
2022-11-23T02:14:04.805Z Start await every_2
2022-11-23T02:14:04.805Z Stop await unify 111.4805ms result=3621,3686,3669,3694,3623,3687,3746,3721,3730,3716
2022-11-23T02:14:04.805Z Stop await every_2 0.0424ms
2022-11-23T02:14:04.805Z Start await every_3
2022-11-23T02:14:04.805Z Stop await every_3 0.0033ms
2022-11-23T02:14:04.805Z Start await every_4
2022-11-23T02:14:04.805Z Stop await every_4 0.0026ms
2022-11-23T02:14:04.805Z Start await every_5
2022-11-23T02:14:04.805Z Stop await every_5 0.0023ms
2022-11-23T02:14:04.805Z Start await every_6
2022-11-23T02:14:04.805Z Stop await every_6 0.0025ms
2022-11-23T02:14:04.805Z Start await every_7
2022-11-23T02:14:04.805Z Stop await every_7 0.0024ms
2022-11-23T02:14:04.805Z Start await every_8
2022-11-23T02:14:04.805Z Stop await every_8 0.0023ms
2022-11-23T02:14:04.805Z Start await every_9
2022-11-23T02:14:04.805Z Stop await every_9 0.0023ms
2022-11-23T02:14:04.805Z Stop every 113.0735ms result=3671,3640,3666,3662,3691,3643,3717,3640,3696,3746
2022-11-23T02:14:04.805Z Stop await main 111.7481ms
2022-11-23T02:14:04.805Z Stop main 115.1154ms

分析:

共提交 21 份承诺: main, every_0~9, unify_0~9
共等待 12 份兑现: every_1~9, unify(合并了0~9), main
这些异步承诺按提交的顺序逐个执行, 合并等待承诺兑现能较早完成.

TRANSLATE with x English
Arabic Hebrew Polish
Bulgarian Hindi Portuguese
Catalan Hmong Daw Romanian
Chinese Simplified Hungarian Russian
Chinese Traditional Indonesian Slovak
Czech Italian Slovenian
Danish Japanese Spanish
Dutch Klingon Swedish
English Korean Thai
Estonian Latvian Turkish
Finnish Lithuanian Ukrainian
French Malay Urdu
German Maltese Vietnamese
Greek Norwegian Welsh
Haitian Creole Persian  
  TRANSLATE with COPY THE URL BELOW Back EMBED THE SNIPPET BELOW IN YOUR SITE Enable collaborative features and customize widget: Bing Webmaster Portal Back     此页面的语言为弗里西语   翻译为中文(简体)        
  • 中文(简体)
  • 中文(繁体)
  • 丹麦语
  • 乌克兰语
  • 乌尔都语
  • 亚美尼亚语
  • 俄语
  • 保加利亚语
  • 克罗地亚语
  • 冰岛语
  • 加泰罗尼亚语
  • 匈牙利语
  • 卡纳达语
  • 印地语
  • 印尼语
  • 古吉拉特语
  • 哈萨克语
  • 土耳其语
  • 威尔士语
  • 孟加拉语
  • 尼泊尔语
  • 布尔语(南非荷兰语)
  • 希伯来语
  • 希腊语
  • 库尔德语
  • 德语
  • 意大利语
  • 拉脱维亚语
  • 挪威语
  • 捷克语
  • 斯洛伐克语
  • 斯洛文尼亚语
  • 旁遮普语
  • 日语
  • 普什图语
  • 毛利语
  • 法语
  • 波兰语
  • 波斯语
  • 泰卢固语
  • 泰米尔语
  • 泰语
  • 海地克里奥尔语
  • 爱沙尼亚语
  • 瑞典语
  • 立陶宛语
  • 缅甸语
  • 罗马尼亚语
  • 老挝语
  • 芬兰语
  • 英语
  • 荷兰语
  • 萨摩亚语
  • 葡萄牙语
  • 西班牙语
  • 越南语
  • 阿塞拜疆语
  • 阿姆哈拉语
  • 阿尔巴尼亚语
  • 阿拉伯语
  • 韩语
  • 马尔加什语
  • 马拉地语
  • 马拉雅拉姆语
  • 马来语
  • 马耳他语
  • 高棉语
 

标签:Node,11,14,程序运行,Stop,js,Start,23T02,every
From: https://www.cnblogs.com/fitmap/p/16917452.html

相关文章

  • 19.删除链表的倒数第N个节点 remove-nth-node-from-end-of-list
    问题描述19.删除链表的倒数第N个节点解题思路首先设置一个虚拟头节点pre,pre->next=head;双指针法,考虑使用两个指针fast,slow,一快一慢,fast指针先前进n个位置,然后fast和......
  • js判断空对象的几种方法
    一、将对象转为字符串比较这是最容易想到的方法,主要使用JSON.stringify()这个方法对对象进行强转:vara={};varb=newObject();console.log(JSON.stringify(a)"{}")/......
  • Github+jsDelivr搭建免费快速的个人图床
    香!手把手搭建免费快速的个人图床经常写博文的朋友对床图肯定不陌生。岛主习惯使用markdown撰写博客,将图片放在床图网站生成外链统一管理,这样一份博文就可以发布在不同的平台......
  • js和go对接websocket遇到的问题汇总
    TableofContentsgeneratedwithDocToc​​1.包协议​​​2.相关操作​​​2.1大端编码​​​​2.2大端解码​​​​2.3string转utf8-uint8Array[],utf8-uint8Arra......
  • JWT( JSON Web Token —— JSON Web 令牌 )的学习笔记
    一、跨域认证的问题互联网服务离不开用户认证。一般流程是下面这样:1、用户向服务器发送用户名和密码。2、服务器验证通过后,在当前对话(session)里面保存相关数据,比如用......
  • leetcode 88. 合并两个有序数组 js实现
    给你两个按 非递减顺序 排列的整数数组 nums1 和 nums2,另有两个整数 m 和 n ,分别表示 nums1 和 nums2 中的元素数目。请你 合并 nums2 到 nums1 中,使合......
  • JS前期数组、字符串、时间、定时器、DOM\BOM事件方法等总结
    1.字符串方法        .charAt(对应字符元素下标)——根据下标查找字符串内元素        .charCodeAt(对应字符元素下标)——根据下标查找字符串某元素在u......
  • JS业务
    1.页面的动态绑定2.事件处理3.生命周期函数4.网络请求<templete><view><text>{{title}} </text><textv-for="(item,index)inlist":ke......
  • bitconin-cli 私有链搭建及jsonrpc-api
    精通比特币第三章,讲了如何编译等最后搭建成功之后执行:bitcoind-regtest-daemon后台运行私有链,不加-regtest默认公有链,包括之后对私有链操作,加上-regtest即可如果为了以......
  • [译]Golang中JSON和结构体的组合使用
     原文地址:http://attilaolah.eu/2014/09/10/json-and-struct-composition-in-go/ 假设你正在把一个JSON对象解码为Go的结构体。该JSON来自不受你控制的服......