- Using FreeBSD
- Mountain Lion
- VMware Fusion 5
- Your VMware is installed at '/Applications/VMware Fusion.app'
- Command Line tools are at '/Applications/VMware Fusion.app/Contents/Library'
- especially vmrun
import os | |
import sys | |
pid = os.getpid() | |
with open(f"/proc/{pid}/status") as fp: | |
for line in fp.readlines(): | |
if line.startswith("Cap"): | |
print(line.strip()) |
#include <zmq.hpp> | |
#include <string.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
int main (void) | |
{ | |
zmq::context_t context(1); | |
const char * protocol = | |
"tcp://localhost:5555"; |
#include <iostream> | |
#include <pthread.h> | |
using namespace std; | |
class ScopedLock { | |
public: | |
ScopedLock(pthread_mutex_t & m): mp(&m){ | |
pthread_mutex_lock(mp); | |
}; | |
~ScopedLock(){ |
import getpass | |
import os | |
import threading | |
import time | |
from urllib.parse import urlparse | |
import zipfile | |
import numpy | |
try: | |
from PIL import Image |
diff --git a/instrumentation/net/http/otelhttp/example/server/server.go b/instrumentation/net/http/otelhttp/example/server/server.go | |
index 7389c267..f128042b 100644 | |
--- a/instrumentation/net/http/otelhttp/example/server/server.go | |
+++ b/instrumentation/net/http/otelhttp/example/server/server.go | |
@@ -19,6 +19,7 @@ import ( | |
"io" | |
"log" | |
"net/http" | |
+ "sync" |
import java.util.function.Function; | |
import java.lang.Long; | |
class Bench { | |
public static void main(String[] args) { | |
bench("noop ", (l) -> ""); | |
bench("Long.toHexString()", (l) -> Long.toHexString(l)); | |
bench("byteString.... ", (l) -> sfy(l)); | |
bench("String.format(...)", (l) -> String.format("%016X", l)); |
class HelloWorld { | |
public static void main(String[] args) { | |
bench1(); | |
bench2(); | |
} | |
static void bench1() { | |
long repeat = 1000000000L; | |
long start = java.lang.System.currentTimeMillis(); | |
for (long i = 0; i < repeat; i++) { |