View segment.json
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
{ | |
"format_version": 1, | |
"blocks": [ | |
{ | |
"row_count": 1, | |
"block_size": 76, | |
"file_size": 360, | |
"location": [ | |
"53/133/_b/ba4a60013e27479e856f739aefeadfaf_v0.parquet", | |
0 |
View clash.yaml
This file has been truncated, but you can view the full file.
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
port: 1090 | |
socks-port: 1080 | |
allow-lan: false | |
mode: Rule | |
log-level: info | |
external-controller: :9090 | |
proxies: ~ | |
proxy-groups: | |
- name: 🚀 节点选择 | |
type: select |
View arrow2_read.rs
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
use std::fs; | |
use std::fs::File; | |
use std::sync::mpsc::channel; | |
use std::time::SystemTime; | |
use arrow2::error::Error; | |
use arrow2::io::parquet::read::{self, FileReader}; | |
use threadpool::ThreadPool; | |
// wget https://repo.databend.rs/alapha/input.parquet -O /tmp/input.parquet |
View arrow2_read.rs
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
use std::fs; | |
use std::fs::File; | |
use std::sync::mpsc::channel; | |
use std::time::SystemTime; | |
use arrow2::error::Error; | |
use arrow2::io::parquet::read::{self, FileReader}; | |
use threadpool::ThreadPool; | |
// wget https://repo.databend.rs/alapha/input.parquet -O /tmp/input.parquet |
View b.sh
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
#!/bin/bash | |
cat << EOF > bench.sql | |
SELECT avg(number) FROM numbers_mt(100000000000) | |
SELECT sum(number) FROM numbers_mt(100000000000) | |
SELECT min(number) FROM numbers_mt(100000000000) | |
SELECT max(number) FROM numbers_mt(100000000000) | |
SELECT count(number) FROM numbers_mt(100000000000) | |
SELECT sum(number+number+number) FROM numbers_mt(100000000000) | |
SELECT sum(number) / count(number) FROM numbers_mt(100000000000) |
View bench_arrow.rs
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
// Licensed to the Apache Software Foundation (ASF) under one | |
// or more contributor license agreements. See the NOTICE file | |
// distributed with this work for additional information | |
// regarding copyright ownership. The ASF licenses this file | |
// to you under the Apache License, Version 2.0 (the | |
// "License"); you may not use this file except in compliance | |
// with the License. You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// |
View mod.rs
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
// Copyright 2020-2021 The Datafuse Authors. | |
// | |
// SPDX-License-Identifier: Apache-2.0. | |
mod modulo; | |
use std::marker::PhantomData; | |
use crate::prelude::*; | |
use crate::DFNumericType; |
View memory_arrow.rs
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
use std::sync::{Mutex, Arc, Barrier}; | |
use std::env; | |
use std::time::Instant; | |
use std::sync::mpsc::channel; | |
use std::ptr::NonNull; | |
use std::ptr; | |
use std::alloc::Layout; | |
use std::mem; |
View memory_bench.rs
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
use std::sync::{Mutex, Arc}; | |
use std::env; | |
use std::time::Instant; | |
use std::sync::mpsc::channel; | |
use threadpool::ThreadPool; | |
// test memory bandwidth | |
fn main() { |
View gist:9764fb0abe21aa4ce220a96bbd778042
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
# ClickHouse的top工具,实时查看运行的SQL,运行了多久,来自哪里 | |
# 注意事项:查询SQL的时候,要把客户端里的空格去掉,要判断是否为空,否则影响while read的读取位置 | |
# TODO:清屏很暴力,鼠标滚动就不见了 limit限制 | |
password="xxxx" | |
ls /usr/bin/clickhouse-client >/dev/null 2>&1 |
NewerOlder