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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@oceanbase-odc/nl2sql-benchmark

v1.1.3

Published

这是一个用于测试和评估 SQL 执行性能的基准测试工具。 ## 安装

Readme

BIRD-SQL 基准测试工具

这是一个用于测试和评估 SQL 执行性能的基准测试工具。

安装

  1. 确保已安装 Node.js (推荐 v14 或更高版本)
  2. 安装 MySQL 8,执行初始化脚本
npm install @oceanbase-odc/nl2sql-benchmark -g --registry=https://registry.npmmirror.com

使用方法

nl2sql-benchmark -a <API_URL> --dbHost <DB_HOST> --dbPort <DB_PORT> --dbUser <DB_USER> --dbPassword <DB_PASSWORD> [options]

命令行参数

必需参数:

  • -a, --api <url>: SQL 执行 API 的 URL
  • --dbHost <host>: 数据库主机地址
  • --dbPort <port>: 数据库端口
  • --dbUser <user>: 数据库用户名
  • --dbPassword <password>: 数据库密码

可选参数:

  • -o, --output <path>: 输出结果文件路径 (默认: ./results)
  • -c, --concurrency <number>: 并发请求数 (默认: 5)
  • -t, --timeout <number>: 请求超时时间(ms) (默认: 30000)

API 格式说明

请求格式

benchmark 发送的请求体格式如下:

{
  "question": "自然语言问题",
  "db": {
    "host": "数据库主机地址",
    "port": "数据库端口",
    "username": "数据库用户名",
    "password": "数据库密码",
    "dbName": "数据库名称"
  }
}

响应格式

成功响应:

{
  "sql": "生成的 SQL 查询语句"
}

错误响应(HTTP 状态码 500):

{
  "error": "错误信息"
}

示例

请求:

{
  "question": "How many schools in Amador which the Low Grade is 9 and the High Grade is 12?",
  "db": {
    "host": "localhost",
    "port": 3306,
    "username": "root",
    "password": "password",
    "dbName": "schools"
  }
}

响应:

{
  "sql": "SELECT COUNT(T1.`School Name`) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Amador' AND T1.`Low Grade` = 9 AND T1.`High Grade` = 12"
}