This file contains hidden or 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 solana_account_decoder::UiAccountEncoding; | |
| use solana_client::{nonblocking::rpc_client::RpcClient, rpc_config::RpcAccountInfoConfig}; | |
| use solana_sdk::pubkey::Pubkey; | |
| use std::str::FromStr; | |
| #[derive(Clone, Default, PartialEq, Debug)] | |
| pub struct PoolPair { | |
| base_mint: String, | |
| quote_mint: String, | |
| } |
This file contains hidden or 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
| conversation_id=$1 | |
| log="$conversation_id.log" | |
| output="$conversation_id.txt" | |
| rm -f $log && touch $log | |
| rm -f $output && touch $output | |
| data=$(curl --request GET --url "https://api.twitter.com/2/tweets/search/recent?query=conversation_id:$conversation_id" --header Authorization:\ Bearer\ $ACCESS_TOKEN) | |
| echo $data >> $log |
This file contains hidden or 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
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
This file contains hidden or 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
| spark:0m5.934s | |
| hadoop:0m20.939s |
This file contains hidden or 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
| 测试磁盘读取速度: | |
| sudo hdparm -Tt /dev/sdb1 | |
| Timing cached reads:从linux cache读(不从磁盘读) | |
| Timing buffered disk reads:从磁盘顺序读 | |
| 测试结果: | |
| /dev/sdb1: | |
| Timing cached reads: 18374 MB in 2.00 seconds = 9196.61 MB/sec | |
| Timing buffered disk reads: 456 MB in 3.00 seconds = 151.75 MB/sec |