dongruixuan 最近的时间轴更新
dongruixuan

dongruixuan

V2EX 第 455342 号会员,加入于 2019-11-25 18:09:27 +08:00
根据 dongruixuan 的设置,主题列表被隐藏
二手交易 相关的信息,包括已关闭的交易,不会被隐藏
dongruixuan 最近回复了
84 天前
回复了 hard2reg 创建的主题 问与答 如何提升 FastAPI 的 RPS 上限
简单测了下 rust ,用的 actix-web 。CPU i5-13600K, 在 WSL 下运行。RPS 1.38M
```shell
wrk -t8 -c750 -d10s http://127.0.0.1:8000/api/ping.gif
Running 10s test @ http://127.0.0.1:8000/api/ping.gif
8 threads and 750 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 535.49us 767.36us 14.77ms 90.42%
Req/Sec 175.31k 19.72k 209.16k 76.43%
13988354 requests in 10.10s, 2.11GB read
Requests/sec: 1384945.09
Transfer/sec: 213.97MB
```
如果 wrk 用 2 线程 750 连接只能打到
```
wrk -t2 -c750 -d10s http://127.0.0.1:8000/api/ping.gif
Running 10s test @ http://127.0.0.1:8000/api/ping.gif
2 threads and 750 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 2.05ms 0.98ms 10.72ms 59.25%
Req/Sec 92.84k 3.88k 98.45k 85.86%
1851767 requests in 10.10s, 286.09MB read
Requests/sec: 183347.71
Transfer/sec: 28.33MB
```
代码如下
```rust
use actix_web;
use actix_web::{get, App, HttpResponse, HttpServer, Responder};

const TRANSPARENT_GIF: &'static [u8] =
b"\x47\x49\x46\x38\x39\x61\x01\x00\x01\x00\x80\x00\x00\x00\x00\x00
\xff\xff\xff\x21\xf9\x04\x01\x00\x00\x00\x00\x2c\x00\x00\x00\x00
\x01\x00\x01\x00\x00\x02\x02\x44\x01\x00\x3b";

#[get("/api/ping.gif")]
async fn transparent_image() -> impl Responder {
HttpResponse::Ok()
.append_header(("Content-Type", "image/gif"))
.body(TRANSPARENT_GIF)
}

#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| {
App::new()
.service(transparent_image)
})
.bind(("127.0.0.1", 8000))?
.run()
.await
}
```
263 天前
回复了 evilStart 创建的主题 Cursor 服了,天天都有 cursor 的帖子
只知道有个同事用 cursor 的 pylance + type checking 的时候会报莫名其妙的类型错误,换到 vscode+同版本的 pylance 就好了
这个关联性确定有吗,会不会是开了 swap 什么的
277 天前
回复了 bluebird007 创建的主题 程序员 在工作中遇到了很恶心的需求该怎么办
"只能在 prod 来验证" 这个能录制下 prod 的流量,在测试环境回放吗?
309 天前
回复了 pzict 创建的主题 算法 nvida jetson 替代品
稍微多点能上 mac mini?
328 天前
回复了 pol 创建的主题 问与答 有没有这样的 sql 分析工具, mysql 举例
postgres 的话,这种 visualizer 感觉就很够用了 https://pev2.pages.dev/ 。是不是不太需要把数据集显示出来
2024-10-03 05:15:48 +08:00
回复了 CNM47589 创建的主题 Android 为啥 vivo iqoo 的 Origin os 把以太网网络共享这个功能删掉了
@nyxsonsleep 意思应该是和热点一样,自己可以作为到互联网的网关,手机接个网线到路由器 wan 口,整个路由器下的设备就都能通过这个手机上网?
2024-10-03 05:05:47 +08:00
回复了 googlefans 创建的主题 问与答 国内网站接入 Cloudflare 服务,为什么网站打不开了
301 permanent redirect 应该是给你重定向到 https ? curl 的时候指定 https 了吗
因为不用 serialize?MPI 应该得把数据 serialize 后才能发到其他进程吧,相比之下多线程可以直接用 threadsafe 的 queue 之类的就行
2024-04-03 00:05:01 +08:00
回复了 gtese 创建的主题 Local LLM 离线大模型有支持文档翻译的吗
34b 8bit 量化理论两个 4090 也能跑吧
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   673 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 21:30 · PVG 05:30 · LAX 14:30 · JFK 17:30
♥ Do have faith in what you're doing.