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
#include <cstdint> | |
#include <ctime> | |
#include <iostream> | |
#include <sys/types.h> | |
#include <thread> | |
#include <list> | |
uint64_t now_ns() | |
{ | |
struct timespec ts; |
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
#!/usr/bin/env python | |
# Based on https://github.com/goldshtn/linux-tracing-workshop | |
# Based on https://gist.github.com/SaveTheRbtz/807be09f73d13b80e429d45bd1707e00 | |
""" | |
The MIT License (MIT) | |
Copyright (c) 2017 Sasha Goldshtein | |
Copyright (c) 2018 Alexey Ivanov |
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
#include <bits/time.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/types.h> | |
#include <time.h> | |
// https://igoro.com/archive/gallery-of-processor-cache-effects/ | |
u_int64_t now_ns() |
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
#include <bits/time.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/types.h> | |
#include <time.h> | |
// Answers the question "Does cache oblivious in jemalloc still make sense?" | |
// The short answer is "Yes"! | |
// |
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
#!/usr/bin/env python3 | |
import mmap | |
import time | |
NUMBER_VMAS = 10000 | |
VMA_SIZE = 1<<20 | |
buffer = b'0' * VMA_SIZE | |
def make_vma(): |
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
#!/usr/bin/env python3 | |
# systemd-run --user --unit test-madvise ./test.py | |
# journalctl -u -r | |
import mmap | |
import resource | |
import os | |
def get_cgroup_id(): |
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
#include <limits.h> | |
#include <stddef.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main(int argc, char **argv) | |
{ | |
const char * arg = argv[1]; | |
uint64_t in_host = strtoll(arg, NULL, 16); |
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
void boost::context::detail::fiber_entry<boost::context::detail::fiber_record<boost::context::fiber, FiberStack&, Fiber::RoutineImpl<DB::AsyncTaskExecutor::Routine>>>(boost::context::detail::transfer_t);DB::AsyncTaskExecutor::Routine::operator()(std::__1::function<void ()>);DB::RemoteQueryExecutorReadContext::Task::run(std::__1::function<void (int, Poco::Timespan, DB::AsyncEventTimeoutType, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned int)>, std::__1::function<void ()>);DB::MultiplexedConnections::receivePacketUnlocked(std::__1::function<void (int, Poco::Timespan, DB::AsyncEventTimeoutType, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned int)>);DB::Connection::receivePacket();DB::Connection::receiveDataImpl(DB::NativeReader&);DB::NativeReader::read();DB::IDataType::createColumn(DB::ISerialization const&) const;DB::DataTypeNumberBase<unsigned long>::createColumn() const;operator new(unsigned long);mal |
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
diff --git a/clickhouse_driver/client.py b/clickhouse_driver/client.py | |
index 3c4c097..5dbed7f 100644 | |
--- a/clickhouse_driver/client.py | |
+++ b/clickhouse_driver/client.py | |
@@ -597,7 +597,7 @@ class Client(object): | |
if sample_block: | |
rv = self.send_data(sample_block, data, | |
types_check=types_check, columnar=columnar) | |
- self.receive_end_of_query() | |
+ self.receive_end_of_insert_query() |
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
From cc882d3238775f951718ec29c781c9ecc7774e28 Mon Sep 17 00:00:00 2001 | |
From: Azat Khuzhin <[email protected]> | |
Date: Sun, 1 Oct 2023 21:35:42 +0200 | |
Subject: [PATCH] Avoid reading the file multiple times while sending it to S3 | |
AWS S3 client can read file multiple times, this is required for: | |
- calculate checksums | |
- calculate signature | |
By default checksum calculated before signature [1], but it can be |