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
import dis | |
from itertools import chain | |
from types import CodeType | |
def _get_func_args(stack, count): | |
return reversed([stack.pop() for i in range(count)]) | |
def visit_func(stack, isn): |
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/python3 | |
""" | |
Copyright 2018 Josh Snyder | |
Licensed 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 |
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 <time.h> | |
int main() { | |
struct timespec start; | |
struct timespec end; | |
clock_gettime(CLOCK_REALTIME, &start); | |
for(int i = 0; i < 5000000; i++) { | |
clock_gettime(CLOCK_REALTIME, &end); | |
} | |
printf("%lu %lu\n", end.tv_sec - start.tv_sec, end.tv_nsec - start.tv_nsec); |
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 | |
# As the "bufferbloat" folks have recently re-discovered and/or more widely | |
# publicized, congestion avoidance algorithms (such as those found in TCP) do | |
# a great job of allowing network endpoints to negotiate transfer rates that | |
# maximize a link's bandwidth usage without unduly penalizing any particular | |
# stream. This allows bulk transfer streams to use the maximum available | |
# bandwidth without affecting the latency of non-bulk (e.g. interactive) | |
# streams. |
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 | |
# As the "bufferbloat" folks have recently re-discovered and/or more widely | |
# publicized, congestion avoidance algorithms (such as those found in TCP) do | |
# a great job of allowing network endpoints to negotiate transfer rates that | |
# maximize a link's bandwidth usage without unduly penalizing any particular | |
# stream. This allows bulk transfer streams to use the maximum available | |
# bandwidth without affecting the latency of non-bulk (e.g. interactive) | |
# streams. |
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 | |
set -x | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
#------- end of header (relevant for root/kernel.sh, below) | |
readonly INITRD_DIR=initrd | |
readonly SSH_KEY="ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIyK5qcNzv65trF8pdiLZbnBS6NLJqiHhGSQo6veOswH" |
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 | |
set -x | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
readonly INITRD_DIR=initrd | |
base() { | |
debootstrap \ |
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 <linux/hrtimer.h> | |
#include <linux/module.h> | |
#include <linux/kernel.h> | |
static struct hrtimer timer; | |
enum hrtimer_restart yell_rick( struct hrtimer *timer ) | |
{ | |
ktime_t time; | |
printk(KERN_INFO "I turned myself into a logger morty! I'm dmesg RIIIICK!\n"); |
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/src/main/java/com/tagtraum/perf/gcviewer/view/renderer/TotalTenuredRenderer.java b/src/main/java/com/tagtraum/perf/gcviewer/view/renderer/TotalTenuredRenderer.java | |
index 344965d..f8e31a0 100644 | |
--- a/src/main/java/com/tagtraum/perf/gcviewer/view/renderer/TotalTenuredRenderer.java | |
+++ b/src/main/java/com/tagtraum/perf/gcviewer/view/renderer/TotalTenuredRenderer.java | |
@@ -49,6 +49,8 @@ public class TotalTenuredRenderer extends PolygonChartRenderer { | |
polygon.addPoint(0, (double)tenured.getTotal()); | |
} | |
polygon.addPoint(tenured.getTimestamp() - model.getFirstPauseTimeStamp() + event.getPause(), | |
+ lastTotal); | |
+ polygon.addPoint(tenured.getTimestamp() - model.getFirstPauseTimeStamp() + event.getPause(), |
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
package com.josnyder; | |
import java.lang.management.ManagementFactory; | |
import javax.management.InstanceAlreadyExistsException; | |
import javax.management.MBeanServer; | |
import javax.management.ObjectName; | |
import org.apache.cassandra.service.CassandraDaemon; | |
class HotspotMBeanCassandraDaemon extends CassandraDaemon { | |
protected void setup() { |