Skip to content

Instantly share code, notes, and snippets.

@na--
na-- / simple-load-test.go
Created September 20, 2019 08:35
A simple script that can hammer a given URL with configurable concurrency and number of requests.
package main
import (
"flag"
"io"
"io/ioutil"
"log"
"net"
"net/http"
"sync"
@na--
na-- / client.go
Last active April 14, 2018 05:38
HTTP testing
package main
import (
"bytes"
"flag"
"io"
"log"
"net"
"net/http"
"net/url"
extern crate solution;
use solution::Polynomial;
#[test]
fn test_simple_functions() {
assert_eq!(Polynomial::from(vec![]), Polynomial::from(vec![]));
assert_eq!(Polynomial::from(vec![]), Polynomial::from(vec![0.0]));
assert_eq!(Polynomial::from(vec![]), Polynomial::from(vec![0.0, 0.0]));
assert_eq!(Polynomial::from(vec![0.0, 1.0]), Polynomial::from(vec![1.0]));
assert_eq!(