Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: German translation of benchmark howto
- Loading branch information
1 parent
7978522
commit 7b6c5b3
Showing
5 changed files
with
41 additions
and
4 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
layout: doc_de | ||
title: Anleitung - Benchmarks schreiben | ||
previous: Einen fehlgeschlagenen Spec reparieren | ||
previous_url: how-to/fix-a-failing-spec | ||
next: Einen Blogeintrag schreiben | ||
next_url: how-to/write-a-blog-post | ||
--- | ||
|
||
Warum Benchmarks? | ||
|
||
Benchmarks sind ein hervorragendes Hilfsmittel, um Rubinius mit den anderen | ||
Ruby Implementationen, wie z.B. MRI, JRuby, IronRuby und anderen, zu | ||
vergleichen. Dabei geht es weniger darum, Rubinius selber zu messen, sondern | ||
Vergleichswerte zu erzielen. Möchtest du Benchmarks schreiben, dann achte bitte | ||
auf folgende Richtlinien: | ||
|
||
1. Schau dir bestehende Benchmarks unter rubinius/benchmarks an und versuche | ||
dem Schema zu folgen. | ||
2. Jede Benchmark-Datei sollte sich auf einen besonderen Aspekt von Ruby | ||
konzentrieren, beispielsweise dem Löschen von Schlüsseln und Werten in | ||
Hashes. | ||
3. Verwende das interne Benchmark-Framework. | ||
4. Benchmarks sollten kurz und prägnant sein. | ||
5. Die Benchmarks messen nicht Rubinius. Schreibst du also ein Benchmark für | ||
eine Klasse, die über sog. Bang-Methoden (also das Objekt verändernde | ||
Methoden, meist mit einem Ausrufezeichen versehen) und | ||
Nicht-Bang-Methoden verfügt, dann solltest du für die Bang-Methode das | ||
Objekt duplizieren, nicht jedoch für die Nicht-Bang-Methode. | ||
|
||
Zum Testen der Benchmarks kannst einzelne Dateien oder auch ganze Ordner | ||
übergeben: | ||
|
||
bin/benchmark benchmark/core/string/bench_case.rb | ||
bin/benchmark benchmark/core |
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