From 99218ba65f097d4766dc9d4a5386629df2b02bfe Mon Sep 17 00:00:00 2001 From: Konstantin Anisimov Date: Thu, 3 Aug 2017 09:35:16 +0700 Subject: [PATCH] Copyright inserted Results are normalized on run cycles count --- .../jetbrains/ring/AbstractMethodBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/ClassArrayBenchmark.kt | 16 ++++++++++++++ .../jetbrains/ring/ClassBaselineBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/ClassListBenchmark.kt | 16 ++++++++++++++ .../jetbrains/ring/ClassStreamBenchmark.kt | 16 ++++++++++++++ .../ring/CompanionObjectBenchmark.kt | 16 ++++++++++++++ .../main/kotlin/org/jetbrains/ring/Data.kt | 16 ++++++++++++++ .../ring/DefaultArgumentBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/ElvisBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/EulerBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/FibonacciBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/InlineBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/IntArrayBenchmark.kt | 16 ++++++++++++++ .../jetbrains/ring/IntBaselineBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/IntListBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/IntStreamBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/LambdaBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/LoopBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/MatrixMapBenchmark.kt | 16 ++++++++++++++ .../ParameterNotNullAssertionBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/PrimeListBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/StringBenchmark.kt | 16 ++++++++++++++ .../org/jetbrains/ring/SwitchBenchmark.kt | 16 ++++++++++++++ .../main/kotlin/org/jetbrains/ring/Utils.kt | 16 ++++++++++++++ .../jetbrains/ring/WithIndiciesBenchmark.kt | 16 ++++++++++++++ .../kotlin/org/jetbrains/ring/launcher.kt | 22 +++++++++++++++++-- .../main/kotlin/org/jetbrains/ring/zdf-win.kt | 16 ++++++++++++++ 27 files changed, 436 insertions(+), 2 deletions(-) diff --git a/performance/src/main/kotlin/org/jetbrains/ring/AbstractMethodBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/AbstractMethodBenchmark.kt index 6b9ac93b1e4..79638e5ea1c 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/AbstractMethodBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/AbstractMethodBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring /** diff --git a/performance/src/main/kotlin/org/jetbrains/ring/ClassArrayBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/ClassArrayBenchmark.kt index c5ea7ba7952..0ee34833e7f 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/ClassArrayBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/ClassArrayBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring open class ClassArrayBenchmark { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/ClassBaselineBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/ClassBaselineBenchmark.kt index f3392feb87b..c7bb78f8a95 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/ClassBaselineBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/ClassBaselineBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring open class ClassBaselineBenchmark { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/ClassListBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/ClassListBenchmark.kt index 0f74bc8a64b..83b4f2a760c 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/ClassListBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/ClassListBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring open class ClassListBenchmark { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/ClassStreamBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/ClassStreamBenchmark.kt index 2c4e56d0cc0..1a627bf7c69 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/ClassStreamBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/ClassStreamBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring open class ClassStreamBenchmark { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/CompanionObjectBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/CompanionObjectBenchmark.kt index f721e40a867..4376c2dade6 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/CompanionObjectBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/CompanionObjectBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring open class CompanionObjectBenchmark { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/Data.kt b/performance/src/main/kotlin/org/jetbrains/ring/Data.kt index d9b7531b7b7..dbe8bcb1c60 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/Data.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/Data.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring fun classValues(size: Int): Iterable { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/DefaultArgumentBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/DefaultArgumentBenchmark.kt index 8254b1f126c..4dd314a4981 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/DefaultArgumentBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/DefaultArgumentBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring /** diff --git a/performance/src/main/kotlin/org/jetbrains/ring/ElvisBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/ElvisBenchmark.kt index ab775c034be..7f3aecfc62a 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/ElvisBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/ElvisBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring open class ElvisBenchmark { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/EulerBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/EulerBenchmark.kt index a21e0f09af9..a6983f9b3a0 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/EulerBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/EulerBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring fun fibonacci(): Sequence { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/FibonacciBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/FibonacciBenchmark.kt index 7540720455c..cc36aba185c 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/FibonacciBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/FibonacciBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring /** diff --git a/performance/src/main/kotlin/org/jetbrains/ring/InlineBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/InlineBenchmark.kt index 00ed4666922..54f9c07eba7 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/InlineBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/InlineBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring fun load(value: Int, size: Int): Int { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/IntArrayBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/IntArrayBenchmark.kt index 33a28402f6f..adf5eed6b6f 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/IntArrayBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/IntArrayBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring open class IntArrayBenchmark { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/IntBaselineBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/IntBaselineBenchmark.kt index 3a06d9a619e..a1ac5127cd3 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/IntBaselineBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/IntBaselineBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring diff --git a/performance/src/main/kotlin/org/jetbrains/ring/IntListBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/IntListBenchmark.kt index 2d19b638889..3918e618f92 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/IntListBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/IntListBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring open class IntListBenchmark { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/IntStreamBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/IntStreamBenchmark.kt index 748d0fb1958..6af3942b5a5 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/IntStreamBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/IntStreamBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring open class IntStreamBenchmark { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/LambdaBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/LambdaBenchmark.kt index ff8d82fee48..aa4d9003621 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/LambdaBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/LambdaBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring var globalAddendum = 0 diff --git a/performance/src/main/kotlin/org/jetbrains/ring/LoopBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/LoopBenchmark.kt index 03c660510b8..cda0dfb4f84 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/LoopBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/LoopBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring open class LoopBenchmark { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/MatrixMapBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/MatrixMapBenchmark.kt index 02d77fdb7de..9ac03b6abd0 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/MatrixMapBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/MatrixMapBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring import org.jetbrains.ring.BENCHMARK_SIZE diff --git a/performance/src/main/kotlin/org/jetbrains/ring/ParameterNotNullAssertionBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/ParameterNotNullAssertionBenchmark.kt index 85c24518426..daea0211cb2 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/ParameterNotNullAssertionBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/ParameterNotNullAssertionBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring val OBJ = Any() diff --git a/performance/src/main/kotlin/org/jetbrains/ring/PrimeListBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/PrimeListBenchmark.kt index 41d50543474..c0dbbb3bf9c 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/PrimeListBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/PrimeListBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring /** diff --git a/performance/src/main/kotlin/org/jetbrains/ring/StringBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/StringBenchmark.kt index c967af97fbc..ce35059b526 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/StringBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/StringBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring open class StringBenchmark { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/SwitchBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/SwitchBenchmark.kt index abb25d8684f..c048f18f5d0 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/SwitchBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/SwitchBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring val SPARSE_SWITCH_CASES = intArrayOf(11, 29, 47, 71, 103, diff --git a/performance/src/main/kotlin/org/jetbrains/ring/Utils.kt b/performance/src/main/kotlin/org/jetbrains/ring/Utils.kt index f3a24544ab6..166d8e961f9 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/Utils.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/Utils.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring import kotlin.system.measureNanoTime diff --git a/performance/src/main/kotlin/org/jetbrains/ring/WithIndiciesBenchmark.kt b/performance/src/main/kotlin/org/jetbrains/ring/WithIndiciesBenchmark.kt index 04b38f4c27e..c9b87f30ccf 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/WithIndiciesBenchmark.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/WithIndiciesBenchmark.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring open class WithIndiciesBenchmark { diff --git a/performance/src/main/kotlin/org/jetbrains/ring/launcher.kt b/performance/src/main/kotlin/org/jetbrains/ring/launcher.kt index f33cfdf4903..9d559ec8718 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/launcher.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/launcher.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring import kotlin.system.measureNanoTime @@ -17,8 +33,10 @@ class Launcher(val numWarmIterations: Int, val numMeasureIterations: Int) { val time = measureNanoTime { while (j-- > 0) benchmark() } - results.add(time) - printResult(benchmark.toString(), time) + + val timeNormalized = time / numMeasureIterations + results.add(timeNormalized) + printResult(benchmark.toString(), timeNormalized) } //-------------------------------------------------------------------------// diff --git a/performance/src/main/kotlin/org/jetbrains/ring/zdf-win.kt b/performance/src/main/kotlin/org/jetbrains/ring/zdf-win.kt index b388dd67e90..7b114f65aba 100644 --- a/performance/src/main/kotlin/org/jetbrains/ring/zdf-win.kt +++ b/performance/src/main/kotlin/org/jetbrains/ring/zdf-win.kt @@ -1,3 +1,19 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.jetbrains.ring val zdf_win = listOf(