npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cloudbase/benchmark-tool

v0.1.2

Published

### 使用方法 #### 1、配置环境 在根目录下创建`config.js`,根据`config.example.js`示例填写以下信息: - `env`:环境ID; - `appSign`:安全来源应用标识 - `appSecret`:安全来源应用凭证 - `credentials`:自定义登录私钥 - `fnInfo`:测试目标函数信息,`name`必填,`data`选填

Downloads

7

Readme

tcb-js-sdk 压测工具

使用方法

1、配置环境

在根目录下创建config.js,根据config.example.js示例填写以下信息:

  • env:环境ID;
  • appSign:安全来源应用标识
  • appSecret:安全来源应用凭证
  • credentials:自定义登录私钥
  • fnInfo:测试目标函数信息,name必填,data选填

本工具使用自定义登录进行压测

2、启动

测试SDK的callFunction API
npm start fn:sdk -c <count>
  • count:发起调用的总数。

请注意,由于SDK的callFunction API在发起函数调用之前有一系列的内部前置逻辑,所以此测试结果是前置逻辑+函数调用的总和。

单独测试callFunction接口

单独测试callFunction接口使用autocannon压测工具,运行此工具需要sudo权限:

sudo npm start fn:api -c <connects> -d <duration>
  • connects:并发请求数目,默认100;
  • duration:测试时长,单位秒(s),默认5s。

工作原理如下:

  1. 使用tcb-js-sdk发起callFunction请求并抓取request信息;
  2. 使用autocannon将第一步抓取到的request信息作为body像cloudbase服务器发起并发压测。

3、查看报告

现版本在命令行终端打印测试信息。