Below is list of results collected with netperf. The interesting value is TCP_CRR, it measures how fast it can TCP connect/request/response/receive. In short, the transaction rate. The test is used to simulate a normal HTTP/1.0 transaction. What's worrying is that this value has very low on Xen virtualized guests. Performance differences between bare metal and virtualization has been as high as 2-3x.
// Code from http://lemire.me/blog/archives/2012/07/23/is-cc-worth-it/ | |
// Converted to Go by Nick Craig-Wood | |
// Runs in pretty much identical time to the "basic sum (C++-like)" code | |
package main | |
import ( | |
"fmt" | |
"time" | |
) |
This demonstrates how to make client side certificates with go | |
First generate the certificates with | |
./makecert.sh test@test.com | |
Run the server in one terminal | |
go run server.go |
// Channel based quicksort | |
// | |
// Just for fun! | |
// | |
// Interesting that you can make a quicksort without being able to | |
// index your input. It may be O(n log n) for comparisons but it is | |
// O(n) for channels and go routines so perhaps not the most efficient | |
// quicksort ever ;-) | |
// | |
// It also has the worst case complexity O(n²) if you feed it sorted |
I've finished the first version of rclone integration (see http://rclone.org and http://github.com/ncw/rclone ).
rclone aims to be "rsync for cloud storage" - a command line tool just aimed at the mechanics of transporting files between cloud storage systems and the local disk.
Here are some notes on where I found parts of the API which could be
To reproduce, run the python program onedrive_bug.py
. This needs
the python onedrivesdk. This uploades the file goof.png
repeatedly,
to the root of your onedrive as 1.png
, 2.png
, etc.
If you run it after a while you'll see a size mis-match.
This means that the 97k file is apparently 200k. If you look in the web interface it also appears as 200k, however if you download it is
#!/usr/bin/perl -w | |
use strict; | |
# Rough and ready conversion of arm style assembler to go style | |
# assembler. Note input is expected to be in lower case whereas | |
# output is in upper case. | |
while (<>) { | |
s/ldrb\s+(\w+),\[(\w+),#(\w+)\]/MOVBU\t$3($2),$1/; | |
s/ldr\s+(\w+),\[(\w+),#([^]]+)\]!/MOVW.W\t$3($2),$1/; |
This is going to be a long reply based in my experiences with rclone: https://rclone.org. Rclone interfaces with 30ish different cloud providers and has some very similar interfaces so I feel like I might have something to contribute!
As part of rclone I have made very similar interfaces. In fact there are two, one lower level more matched to the typical things cloud storage systems can do (eg read as streams, use Range requests, not seek in writes) and one which is more general purpose which can do everything a normal file system can (eg seek while writing, ReadAt,
module github.com/ncw/go-issue-53253 | |
go 1.18 | |
replace golang.org/x/net => /opt/go/x/net | |
require ( | |
golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect | |
golang.org/x/text v0.3.6 // indirect | |
) |