Skip to content

Instantly share code, notes, and snippets.

View icheishvili's full-sized avatar

Ilia Cheishvili icheishvili

View GitHub Profile
[2019-08-07T11:41:36.544+0000][8670][safepoint ] Leaving safepoint region
[2019-08-07T11:41:36.544+0000][8670][safepoint ] Total time for which application threads were stopped: 0.0001258 seconds, Stopping threads took: 0.0000239 seconds
[2019-08-07T11:41:37.545+0000][8670][safepoint ] Application time: 1.0000988 seconds
[2019-08-07T11:41:37.545+0000][8670][safepoint ] Entering safepoint region: Cleanup
[2019-08-07T11:41:37.545+0000][8670][safepoint ] Leaving safepoint region
[2019-08-07T11:41:37.545+0000][8670][safepoint ] Total time for which application threads were stopped: 0.0001082 seconds, Stopping threads took: 0.0000199 seconds
[2019-08-07T11:41:38.545+0000][8670][safepoint ] Application time: 1.0000852 seconds
[2019-08-07T11:41:38.545+0000][8670][safepoint ] Entering safepoint region: Cleanup
[2019-08-07T11:41:38.545+0000][8670][safepoint ] Leaving safepoint region
[2019-08-07T11:41:38.545+0000][8670][safepoint ] Total time for which application threads were stopped: 0.
::: {production_5}{LDS3OYk-TJaxxmxEYnhTsQ}{FnUem47gQECGFgy7QEUbwg}{10.0.7.191}{10.0.7.191:9300}{dim}{ml.machine_memory=8100618240, ml.max_open_jobs=20, xpack.installed=true}
Hot threads at 2019-08-07T11:41:21.796Z, interval=500ms, busiestThreads=99999, ignoreIdleThreads=false:
0.1% (643.8micros out of 500ms) cpu usage by thread 'elasticsearch[production_5][refresh][T#1]'
10/10 snapshots sharing following 9 elements
java.base@12.0.1/jdk.internal.misc.Unsafe.park(Native Method)
java.base@12.0.1/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base@12.0.1/java.util.concurrent.LinkedTransferQueue.awaitMatch(LinkedTransferQueue.java:743)
java.base@12.0.1/java.util.concurrent.LinkedTransferQueue.xfer(LinkedTransferQueue.java:684)
java.base@12.0.1/java.util.concurrent.LinkedTransferQueue.take(LinkedTransferQueue.java:1366)
@icheishvili
icheishvili / easy_serialization_example.rb
Last active August 29, 2015 14:17
This is the best serialization that I've been able to come up with after dealing with all kinds of gems and frustration
module EasySerialization
extend ActiveSupport::Concern
included do
self.class_attribute :serialization_config
self.serialization_config = Hash.new { |h, k| h[k] = [] }
end
def serializable_hash(opts={})
opts ||= {}
[
{
"channel_id": 121,
"created_at": "2014-07-04T20:34:01-04:00",
"down": false,
"id": 1747402,
"member_id": 5079674,
"network_id": 2,
"position": null,
"track_id": 32792,
@icheishvili
icheishvili / list.c
Created December 2, 2012 19:40
Linked List in C with Iterator
struct list_node {
void* data;
struct list_node* next;
};
struct list {
struct list_node* head;
};
struct list* list_create() {
@icheishvili
icheishvili / conways_game_of_life.py
Created March 25, 2012 21:19
Conway's Game of Life
def make_board(width, height):
return [[0 for x in range(width)] for y in range(height)]
def print_board(board):
for row in board:
print ''.join([str(x) for x in row])
def neighbors(board, x, y):
def coords(x, y):
yield x - 1, y - 1
@icheishvili
icheishvili / match.py
Created March 12, 2012 21:48
Faster automata-style string-matching
#!/usr/bin/env python
def match(needle, haystack):
"""Perform finite-automata style string matching."""
matches = []
nposition = 0
for index, char in enumerate(haystack):
if needle[nposition] == char:
nposition += 1
@icheishvili
icheishvili / tcp_magic.php
Created October 19, 2011 00:07
Using PHP streams to invoke things in parallel over a network
<?php
class TcpMagic {
private $_socket = null;
public function __construct($host, $port) {
$this->_socket = socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));
socket_connect($this->_socket, $host, $port);
}