-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(2694): tailcall server run via npx command (#2733)
Co-authored-by: Tushar Mathur <[email protected]>
- Loading branch information
1 parent
dbf10b4
commit 04e7a6a
Showing
6 changed files
with
118 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
// @ts-check | ||
import {familySync, GLIBC, MUSL} from "detect-libc" | ||
import get_matched_platform from "./utils.js" | ||
|
||
const os = process.platform | ||
const arch = process.arch | ||
const libcFamily = familySync() | ||
|
||
let libc = "" | ||
if (os === "win32") { | ||
libc = "msvc" | ||
} else { | ||
libc = libcFamily === GLIBC ? "gnu" : libcFamily === MUSL ? "musl" : "" | ||
} | ||
|
||
const matched_platform = get_matched_platform(os, arch, libc) | ||
|
||
const dependency = Object.keys(optionalDependencies).find((name) => name.includes(`${os}-${arch}`)) | ||
if (!dependency) { | ||
if (matched_platform == null) { | ||
const redColor = "\x1b[31m" | ||
const resetColor = "\x1b[0m" | ||
console.error(`${redColor} Tailcall does not support platform ${os} arch ${arch} ${resetColor}`) | ||
console.error(`${redColor} Tailcall does not support platform - ${os}, arch - ${arch}, libc - ${libc} ${resetColor}`) | ||
process.exit(1) | ||
} |
Oops, something went wrong.
04e7a6a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running 30s test @ http://localhost:8000/graphql
4 threads and 100 connections
259451 requests in 30.04s, 1.30GB read
Requests/sec: 8638.24
Transfer/sec: 44.34MB