-- https://www.geekytidbits.com/performance-tuning-postgres/ | |
-- http://www.craigkerstiens.com/2012/10/01/understanding-postgres-performance/ | |
-- http://okigiveup.net/what-postgresql-tells-you-about-its-performance/ | |
-- https://wiki.postgresql.org/wiki/Introduction_to_VACUUM,_ANALYZE,_EXPLAIN,_and_COUNT | |
-- https://devcenter.heroku.com/articles/postgresql-indexes#b-trees-and-sorting | |
-- http://www.databasesoup.com/2014/05/new-finding-unused-indexes-query.html | |
-- performance tools | |
-- https://www.vividcortex.com/resources/network-analyzer-for-postgresql | |
-- show running queries (pre 9.2) |
Charts are from different sources and thus colors are inconsistent, please carefully read the chart's legends.
Like this? Check React Native vs Flutter: https://gist.github.com/tkrotoff/93f5278a4e8df7e5f6928eff98684979
Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups
command.
- List the topics to which the group is subscribed
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe
Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.
- Reset the consumer offset for a topic (preview)
"use strict"; | |
// Registering cleanup callback before requiring flightplan. | |
process.on("SIGINT", interruptedCleanup); | |
const util = require("util"), | |
moment = require("moment"), | |
_ = require("lodash"), | |
plan = require("flightplan"), | |
request = require("request-promise"); |
Years ago, some smart folks that worked on JS engines realized that not all JS that's loaded into a page/app initially is needed right away. They implemented JIT to optimize this situation.
JIT means Just-In-Time, which means essentially that the engine can defer processing (parsing, compiling) certain parts of a JS program until a later time, for example when the function in question is actually needed. This deferral means the engine is freer to spend the important cycles right now on the code that's going to run right now. This is a really good thing for JS performance.
Some time later, some JS engine devs realized that they needed to get some hints from the code as to which functions would run right away, and which ones wouldn't. In technical speak, these hints are called heuristics.
So they realized that one very common pattern for knowing that a function was going to run right away is if the first character before the function
keyword was a (
, because that usually m
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
import requests | |
import time | |
import json | |
token = '' | |
#Delete files older than this: | |
ts_to = int(time.time()) - 30 * 24 * 60 * 60 | |
def list_files(): |