root@test:~# ./listmap.test -test.v -test.bench="Benchmark.*" -test.benchtime=5s
=== RUN Test1
=== RUN Test2
=== RUN Test3
=== RUN TestRemove
=== RUN TestSequentialShort
--- PASS: TestSequentialShort (0.00 seconds)
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
// g++ -std=c++14 task.cc -pthread | |
#include <iostream> | |
#include <functional> | |
#include <future> | |
#include <thread> | |
#include <chrono> | |
#include <mutex> | |
#include <queue> | |
#include <memory> | |
#include <atomic> |
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
/* | |
$ cc context.c && ./a.out | |
foo() - 1 | |
bar() - 1 | |
foo() - 2 | |
bar() - 2 | |
foo() - 3 | |
bar() - 3 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>gutterSettings</key> | |
<dict> | |
<key>background</key> | |
<string>#FFFFFF</string> | |
<key>divider</key> | |
<string>#000000</string> |
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 main | |
import ( | |
"sync" | |
"testing" | |
) | |
// BenchmarkPanicRecovery 1000000 1025 ns/op | |
func BenchmarkPanicRecovery(b *testing.B) { | |
buffer := []byte{0, 1, 2, 3} |
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 main | |
import ( | |
"github.com/PreetamJinka/sflow-go" | |
"github.com/PreetamJinka/udpchan" | |
"fmt" | |
"io/ioutil" | |
"net" | |
"runtime" |
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
<? | |
$plans = array( | |
'tera' => array('12G', 256000, 2, '11750M'), | |
'peta' => array('25G', 512000, 4, '24500M'), | |
'exa' => array('50G', 1024000, 8, '49G'), | |
'zetta' => array('100G', 2048000, 8, '99G'), | |
'yotta' => array('200G', 4096000, 8, '199G') | |
); | |
$images = array( |
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/php | |
<? | |
$user = trim(`id -un`); | |
$hostname = trim(`hostname`); | |
declare(ticks = 1); | |
pcntl_signal(SIGTERM, "signal_handler"); | |
pcntl_signal(SIGINT, "signal_handler"); | |
function signal_handler($signal) { |
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 main | |
import ( | |
"log" | |
"fmt" | |
"syscall" | |
"github.com/PreetamJinka/ethernetdecode" | |
) |
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 main | |
import ( | |
"github.com/PreetamJinka/sflow-go" | |
"github.com/PreetamJinka/udpchan" | |
"fmt" | |
"log" | |
"net" | |
"time" |
OlderNewer