de9a88b964
BenchmarkAppendSample.* before this change: BenchmarkAppendSample1 1000000 1142 ns/op --- BENCH: BenchmarkAppendSample1 memory_test.go:81: 1 cycles with 9992.000000 bytes per cycle, totalling 9992 memory_test.go:81: 100 cycles with 250.399994 bytes per cycle, totalling 25040 memory_test.go:81: 10000 cycles with 239.428802 bytes per cycle, totalling 2394288 memory_test.go:81: 1000000 cycles with 255.504684 bytes per cycle, totalling 255504688 BenchmarkAppendSample10 500000 3823 ns/op --- BENCH: BenchmarkAppendSample10 memory_test.go:81: 1 cycles with 15536.000000 bytes per cycle, totalling 15536 memory_test.go:81: 100 cycles with 662.239990 bytes per cycle, totalling 66224 memory_test.go:81: 10000 cycles with 601.937622 bytes per cycle, totalling 6019376 memory_test.go:81: 500000 cycles with 598.582764 bytes per cycle, totalling 299291408 BenchmarkAppendSample100 50000 41111 ns/op --- BENCH: BenchmarkAppendSample100 memory_test.go:81: 1 cycles with 79824.000000 bytes per cycle, totalling 79824 memory_test.go:81: 100 cycles with 4924.479980 bytes per cycle, totalling 492448 memory_test.go:81: 10000 cycles with 4278.019043 bytes per cycle, totalling 42780192 memory_test.go:81: 50000 cycles with 4275.242676 bytes per cycle, totalling 213762144 BenchmarkAppendSample1000 5000 533933 ns/op --- BENCH: BenchmarkAppendSample1000 memory_test.go:81: 1 cycles with 840224.000000 bytes per cycle, totalling 840224 memory_test.go:81: 100 cycles with 62789.281250 bytes per cycle, totalling 6278928 memory_test.go:81: 5000 cycles with 55208.601562 bytes per cycle, totalling 276043008 ok github.com/prometheus/prometheus/storage/metric/tiered 27.828s BenchmarkAppendSample.* after this change: BenchmarkAppendSample1 1000000 1109 ns/op --- BENCH: BenchmarkAppendSample1 memory_test.go:131: 1 cycles with 9992.000000 bytes per cycle, totalling 9992 memory_test.go:131: 100 cycles with 250.399994 bytes per cycle, totalling 25040 memory_test.go:131: 10000 cycles with 239.220795 bytes per cycle, totalling 2392208 memory_test.go:131: 1000000 cycles with 255.492630 bytes per cycle, totalling 255492624 BenchmarkAppendSample10 500000 3663 ns/op --- BENCH: BenchmarkAppendSample10 memory_test.go:131: 1 cycles with 15536.000000 bytes per cycle, totalling 15536 memory_test.go:131: 100 cycles with 662.239990 bytes per cycle, totalling 66224 memory_test.go:131: 10000 cycles with 601.889587 bytes per cycle, totalling 6018896 memory_test.go:131: 500000 cycles with 598.550903 bytes per cycle, totalling 299275472 BenchmarkAppendSample100 50000 40694 ns/op --- BENCH: BenchmarkAppendSample100 memory_test.go:131: 1 cycles with 78976.000000 bytes per cycle, totalling 78976 memory_test.go:131: 100 cycles with 4928.319824 bytes per cycle, totalling 492832 memory_test.go:131: 10000 cycles with 4277.961426 bytes per cycle, totalling 42779616 memory_test.go:131: 50000 cycles with 4275.054199 bytes per cycle, totalling 213752720 BenchmarkAppendSample1000 5000 530744 ns/op --- BENCH: BenchmarkAppendSample1000 memory_test.go:131: 1 cycles with 842192.000000 bytes per cycle, totalling 842192 memory_test.go:131: 100 cycles with 62765.441406 bytes per cycle, totalling 6276544 memory_test.go:131: 5000 cycles with 55209.812500 bytes per cycle, totalling 276049056 ok github.com/prometheus/prometheus/storage/metric/tiered 27.468s Change-Id: Idaa339cd83539b5e4391614541a2c3a04002d66d |
||
---|---|---|
.build | ||
coding/indexable | ||
config | ||
documentation | ||
model | ||
notification | ||
retrieval | ||
rules | ||
stats | ||
storage | ||
tools | ||
utility | ||
web | ||
.gitignore | ||
.pkgignore | ||
.travis.yml | ||
build_info.go | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
CONTRIBUTORS.md | ||
Dockerfile | ||
LICENSE | ||
main.go | ||
Makefile | ||
Makefile.INCLUDE | ||
MANIFEST | ||
README.md | ||
tests-for-die-in-a-fire-travis.sh | ||
VERSION |
Prometheus
Bedecke deinen Himmel, Zeus! A new kid is in town.
Prometheus is a generic time series collection and computation server that is useful in the following fields:
- Industrial Experimentation / Real-Time Behavioral Validation / Software Release Qualification
- Econometric and Natural Sciences
- Operational Concerns and Monitoring
The system is designed to collect telemetry from named targets on given intervals, evaluate rule expressions, display the results, and trigger an action if some condition is observed to be true.
Prerequisites
If you read below in the Getting Started section, the build infrastructure will take care of the following things for you in most cases:
- Go 1.1.
- LevelDB: https://code.google.com/p/leveldb/.
- Protocol Buffers Compiler: http://code.google.com/p/protobuf/.
- goprotobuf: the code generator and runtime library: http://code.google.com/p/goprotobuf/.
- Levigo, a Go-wrapper around LevelDB's C library: https://github.com/jmhodges/levigo.
- GoRest, a RESTful style web-services framework: http://code.google.com/p/gorest/.
- Prometheus Client, Prometheus in Prometheus https://github.com/prometheus/client_golang.
- Snappy, a compression library for LevelDB and Levigo http://code.google.com/p/snappy/.
Getting Started
For basic help how to get started:
- The source code is periodically indexed: Prometheus Core.
- For UNIX-like environment users, please consult the Travis CI configuration in .travis.yml and Makefile.
- All of the core developers are accessible via the Prometheus Developers Mailinglist.
General
For first time users, simply run the following:
$ make
$ ARGUMENTS="-configFile=documentation/examples/prometheus.conf" make run
${ARGUMENTS}
is passed verbatim into the makefile and thusly Prometheus as
$(ARGUMENTS)
. This is useful for quick one-off invocations and smoke
testing.
If you run into problems, try the following:
$ SILENCE_THIRD_PARTY_BUILDS=false make
Upon having a satisfactory build, it's possible to create an artifact for end-user distribution:
$ make package
$ find build/package
build/package
will be sufficient for whatever archiving mechanism you
choose. The important thing to note is that Go presently does not
staticly link against C dependency libraries, so including the lib
directory is paramount. Providing LD_LIBRARY_PATH
or
DYLD_LIBRARY_PATH
in a scaffolding shell script is advised.
Problems
If at any point you run into an error with the make
build system in terms of
its not properly scaffolding things on a given environment, please file a bug or
open a pull request with your changes if you can fix it yourself.
Please note that we're explicitly shooting for stable runtime environments and not the latest-whiz bang releases; thusly, we ask you to provide ample architecture and release identification remarks for us.
Testing
$ make test
Packaging
$ make package
Race Detector
Go 1.1 includes a race detector which can be enabled at build time. Here's how to use it with Prometheus (assumes that you've already run a successful build).
To run the tests with race detection:
$ GORACE="log_path=/tmp/foo" go test -race ./...
To run the server with race detection:
$ go build -race .
$ GORACE="log_path=/tmp/foo" ./prometheus
Contributing
Refer to CONTRIBUTING.md
License
Apache License 2.0