upgrade testcases to use the new form of running benchmarks

This commit is contained in:
Matthew Griffith 2021-07-04 12:43:51 -04:00
parent 8384d732f1
commit 6bc4c9f463
52 changed files with 862 additions and 416 deletions

View File

@ -64,12 +64,12 @@ async function go() {
// {
// name: 'Elm Core',
// dir: 'testcases/core',
// elmFile: 'Main.elm',
// elmFile: 'V8/Benchmark.elm',
// },
// {
// name: 'Elm CSS',
// dir: 'testcases/elm-css',
// elmFile: 'Main.elm',
// elmFile: 'V8/Benchmark.elm',
// },
{
name: 'Html',
@ -79,28 +79,28 @@ async function go() {
// {
// name: 'Elm UI',
// dir: 'testcases/elm-ui',
// elmFile: 'Main.elm',
// elmFile: 'V8/Benchmark.elm',
// },
// {
// name: 'Elm UI 2',
// dir: 'testcases/elm-ui-2',
// elmFile: 'Main.elm',
// elmFile: 'V8/Benchmark.elm',
// },
// {
// name: 'elm-animator',
// dir: 'testcases/elm-animator',
// elmFile: 'Run.elm',
// elmFile: 'V8/Benchmark.elm',
// },
// {
// name: 'Elm Markdown',
// dir: 'testcases/elm-markdown',
// elmFile: 'Run.elm',
// elmFile: 'V8/Benchmark.elm',
// },
// // // This one takes forever
// {
// name: 'elm-obj-file',
// dir: 'testcases/elm-obj-file',
// elmFile: 'Run.elm',
// elmFile: 'V8/Benchmark.elm',
// },
]);
const result = await report;

View File

@ -1,24 +1,10 @@
port module Main exposing (main)
module Suite exposing (suite)
{-| -}
import Benchmark exposing (..)
import Benchmark.Runner exposing (BenchmarkProgram, program)
import Benchmark.Runner.Json
import Dict
import Html
import Json.Decode
import Json.Encode
import List
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults suite
port reportResults : Json.Encode.Value -> Cmd msg
type MyType
= Zero

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,64 @@
module V8.Debug exposing (memory, optimizationStatus, reportV8StatusForBenchmarks)
{-| -}
import Json.Encode
memory : String -> a -> a
memory tag value =
value
type Status
= Status Int
optimizationStatus : String -> a -> a
optimizationStatus tag value =
value
{-|
hasFastProperties obj
hasFastSmiElements obj
hasFastObjectElements obj
hasFastDoubleElements obj
hasDictionaryElements obj
hasFastHoleyElements obj
haveSameMap ( obj1, obj2 )
isValidSmi obj
isSmi obj
hasFastSmiOrObjectElements obj
hasSloppyArgumentsElements obj
-}
type alias Memory =
{ tag : String
, hasFastProperties : Bool
, hasFastSmiElements : Bool
, hasFastObjectElements : Bool
, hasFastDoubleElements : Bool
, hasDictionaryElements : Bool
, hasFastHoleyElements : Bool
, isValidSmi : Bool
, isSmi : Bool
, hasFastSmiOrObjectElements : Bool
, hasSloppyArgumentsElements : Bool
}
reportV8StatusForBenchmarks : () -> Json.Encode.Value
reportV8StatusForBenchmarks _ =
Json.Encode.null

View File

@ -1,22 +0,0 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Main</title>
<script src="output/elm.opt.js"></script>
</head>
<body>
<div id="myapp"></div>
<script>
var app = Elm.Main.init({
node: document.getElementById('myapp'),
});
window.results = [];
app.ports.reportResults.subscribe(function(message) {
window.results = message;
document.title = 'done';
});
</script>
</body>
</html>

View File

@ -1,21 +0,0 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Main</title>
<script src="output/elm.opt.transformed.js"></script>
</head>
<body>
<div id="myapp"></div>
<script>
var app = Elm.Main.init({
node: document.getElementById('myapp'),
});
window.results = [];
app.ports.reportResults.subscribe(function(message) {
window.results = message;
document.title = 'done';
});
</script>
</body>
</html>

View File

@ -1,25 +1,13 @@
port module Main exposing (main)
module Suite exposing (suite)
{-| -}
import Benchmark exposing (..)
import Benchmark.Runner exposing (BenchmarkProgram, program)
import Benchmark.Runner.Json
import Dict
import Html
import Json.Decode
import Json.Encode
import List
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults suite
port reportResults : Json.Encode.Value -> Cmd msg
type MyType
= Zero
| One Int

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,64 @@
module V8.Debug exposing (memory, optimizationStatus, reportV8StatusForBenchmarks)
{-| -}
import Json.Encode
memory : String -> a -> a
memory tag value =
value
type Status
= Status Int
optimizationStatus : String -> a -> a
optimizationStatus tag value =
value
{-|
hasFastProperties obj
hasFastSmiElements obj
hasFastObjectElements obj
hasFastDoubleElements obj
hasDictionaryElements obj
hasFastHoleyElements obj
haveSameMap ( obj1, obj2 )
isValidSmi obj
isSmi obj
hasFastSmiOrObjectElements obj
hasSloppyArgumentsElements obj
-}
type alias Memory =
{ tag : String
, hasFastProperties : Bool
, hasFastSmiElements : Bool
, hasFastObjectElements : Bool
, hasFastDoubleElements : Bool
, hasDictionaryElements : Bool
, hasFastHoleyElements : Bool
, isValidSmi : Bool
, isSmi : Bool
, hasFastSmiOrObjectElements : Bool
, hasSloppyArgumentsElements : Bool
}
reportV8StatusForBenchmarks : () -> Json.Encode.Value
reportV8StatusForBenchmarks _ =
Json.Encode.null

View File

@ -1,22 +0,0 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Main</title>
<script src="output/elm.opt.js"></script>
</head>
<body>
<div id="myapp"></div>
<script>
var app = Elm.Main.init({
node: document.getElementById('myapp'),
});
window.results = [];
app.ports.reportResults.subscribe(function(message) {
window.results = message;
document.title = 'done';
});
</script>
</body>
</html>

View File

@ -1,21 +0,0 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Main</title>
<script src="output/elm.opt.transformed.js"></script>
</head>
<body>
<div id="myapp"></div>
<script>
var app = Elm.Main.init({
node: document.getElementById('myapp'),
});
window.results = [];
app.ports.reportResults.subscribe(function(message) {
window.results = message;
document.title = 'done';
});
</script>
</body>
</html>

View File

@ -1,18 +0,0 @@
port module Run exposing (main)
{-| -}
import Benchmark exposing (..)
import Benchmark.Runner exposing (BenchmarkProgram, program)
import Benchmark.Runner.Json
import Benchmarks
import Html
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Benchmarks.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,8 @@
module Suite exposing (suite)
{-| -}
import Benchmarks
suite = Benchmarks.suite

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,64 @@
module V8.Debug exposing (memory, optimizationStatus, reportV8StatusForBenchmarks)
{-| -}
import Json.Encode
memory : String -> a -> a
memory tag value =
value
type Status
= Status Int
optimizationStatus : String -> a -> a
optimizationStatus tag value =
value
{-|
hasFastProperties obj
hasFastSmiElements obj
hasFastObjectElements obj
hasFastDoubleElements obj
hasDictionaryElements obj
hasFastHoleyElements obj
haveSameMap ( obj1, obj2 )
isValidSmi obj
isSmi obj
hasFastSmiOrObjectElements obj
hasSloppyArgumentsElements obj
-}
type alias Memory =
{ tag : String
, hasFastProperties : Bool
, hasFastSmiElements : Bool
, hasFastObjectElements : Bool
, hasFastDoubleElements : Bool
, hasDictionaryElements : Bool
, hasFastHoleyElements : Bool
, isValidSmi : Bool
, isSmi : Bool
, hasFastSmiOrObjectElements : Bool
, hasSloppyArgumentsElements : Bool
}
reportV8StatusForBenchmarks : () -> Json.Encode.Value
reportV8StatusForBenchmarks _ =
Json.Encode.null

View File

@ -1,23 +1,12 @@
port module Main exposing (main)
module Suite exposing (suite)
{-| -}
import Benchmark exposing (..)
import Benchmark.Runner exposing (BenchmarkProgram, program)
import Benchmark.Runner.Json
import Css exposing (..)
import Html.Styled exposing (..)
import Html.Styled.Attributes exposing (css, href, src)
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults suite
port reportResults : Json.Encode.Value -> Cmd msg
three =
List.repeat 3 0

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,64 @@
module V8.Debug exposing (memory, optimizationStatus, reportV8StatusForBenchmarks)
{-| -}
import Json.Encode
memory : String -> a -> a
memory tag value =
value
type Status
= Status Int
optimizationStatus : String -> a -> a
optimizationStatus tag value =
value
{-|
hasFastProperties obj
hasFastSmiElements obj
hasFastObjectElements obj
hasFastDoubleElements obj
hasDictionaryElements obj
hasFastHoleyElements obj
haveSameMap ( obj1, obj2 )
isValidSmi obj
isSmi obj
hasFastSmiOrObjectElements obj
hasSloppyArgumentsElements obj
-}
type alias Memory =
{ tag : String
, hasFastProperties : Bool
, hasFastSmiElements : Bool
, hasFastObjectElements : Bool
, hasFastDoubleElements : Bool
, hasDictionaryElements : Bool
, hasFastHoleyElements : Bool
, isValidSmi : Bool
, isSmi : Bool
, hasFastSmiOrObjectElements : Bool
, hasSloppyArgumentsElements : Bool
}
reportV8StatusForBenchmarks : () -> Json.Encode.Value
reportV8StatusForBenchmarks _ =
Json.Encode.null

View File

@ -1,22 +0,0 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Main</title>
<script src="output/elm.opt.js"></script>
</head>
<body>
<div id="myapp"></div>
<script>
var app = Elm.Main.init({
node: document.getElementById('myapp'),
});
window.results = [];
app.ports.reportResults.subscribe(function(message) {
window.results = message;
document.title = 'done';
});
</script>
</body>
</html>

View File

@ -1,21 +0,0 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Main</title>
<script src="output/elm.opt.transformed.js"></script>
</head>
<body>
<div id="myapp"></div>
<script>
var app = Elm.Main.init({
node: document.getElementById('myapp'),
});
window.results = [];
app.ports.reportResults.subscribe(function(message) {
window.results = message;
document.title = 'done';
});
</script>
</body>
</html>

View File

@ -1,18 +0,0 @@
port module Run exposing (main)
{-| -}
import Benchmark exposing (..)
import Benchmark.Runner exposing (BenchmarkProgram, program)
import Benchmark.Runner.Json
import Benchmarks
import Html
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Benchmarks.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,12 @@
module Suite exposing (suite)
{-| -}
import Benchmarks
suite =
Benchmarks.suite

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,64 @@
module V8.Debug exposing (memory, optimizationStatus, reportV8StatusForBenchmarks)
{-| -}
import Json.Encode
memory : String -> a -> a
memory tag value =
value
type Status
= Status Int
optimizationStatus : String -> a -> a
optimizationStatus tag value =
value
{-|
hasFastProperties obj
hasFastSmiElements obj
hasFastObjectElements obj
hasFastDoubleElements obj
hasDictionaryElements obj
hasFastHoleyElements obj
haveSameMap ( obj1, obj2 )
isValidSmi obj
isSmi obj
hasFastSmiOrObjectElements obj
hasSloppyArgumentsElements obj
-}
type alias Memory =
{ tag : String
, hasFastProperties : Bool
, hasFastSmiElements : Bool
, hasFastObjectElements : Bool
, hasFastDoubleElements : Bool
, hasDictionaryElements : Bool
, hasFastHoleyElements : Bool
, isValidSmi : Bool
, isSmi : Bool
, hasFastSmiOrObjectElements : Bool
, hasSloppyArgumentsElements : Bool
}
reportV8StatusForBenchmarks : () -> Json.Encode.Value
reportV8StatusForBenchmarks _ =
Json.Encode.null

View File

@ -1,22 +0,0 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Main</title>
<script src="output/elm.opt.js"></script>
</head>
<body>
<div id="myapp"></div>
<script>
var app = Elm.Run.init({
node: document.getElementById('myapp'),
});
window.results = [];
app.ports.reportResults.subscribe(function(message) {
window.results = message;
document.title = 'done';
});
</script>
</body>
</html>

View File

@ -1,21 +0,0 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Main</title>
<script src="output/elm.opt.transformed.js"></script>
</head>
<body>
<div id="myapp"></div>
<script>
var app = Elm.Run.init({
node: document.getElementById('myapp'),
});
window.results = [];
app.ports.reportResults.subscribe(function(message) {
window.results = message;
document.title = 'done';
});
</script>
</body>
</html>

View File

@ -1,4 +1,4 @@
port module Run exposing (main)
module Suite exposing (suite)
{-| -}
@ -11,12 +11,6 @@ import Length
import Obj.Decode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults suite
port reportResults : Json.Encode.Value -> Cmd msg
suite =

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,64 @@
module V8.Debug exposing (memory, optimizationStatus, reportV8StatusForBenchmarks)
{-| -}
import Json.Encode
memory : String -> a -> a
memory tag value =
value
type Status
= Status Int
optimizationStatus : String -> a -> a
optimizationStatus tag value =
value
{-|
hasFastProperties obj
hasFastSmiElements obj
hasFastObjectElements obj
hasFastDoubleElements obj
hasDictionaryElements obj
hasFastHoleyElements obj
haveSameMap ( obj1, obj2 )
isValidSmi obj
isSmi obj
hasFastSmiOrObjectElements obj
hasSloppyArgumentsElements obj
-}
type alias Memory =
{ tag : String
, hasFastProperties : Bool
, hasFastSmiElements : Bool
, hasFastObjectElements : Bool
, hasFastDoubleElements : Bool
, hasDictionaryElements : Bool
, hasFastHoleyElements : Bool
, isValidSmi : Bool
, isSmi : Bool
, hasFastSmiOrObjectElements : Bool
, hasSloppyArgumentsElements : Bool
}
reportV8StatusForBenchmarks : () -> Json.Encode.Value
reportV8StatusForBenchmarks _ =
Json.Encode.null

View File

@ -1,22 +0,0 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Main</title>
<script src="output/elm.opt.js"></script>
</head>
<body>
<div id="myapp"></div>
<script>
var app = Elm.Run.init({
node: document.getElementById('myapp'),
});
window.results = [];
app.ports.reportResults.subscribe(function(message) {
window.results = message;
document.title = 'done';
});
</script>
</body>
</html>

View File

@ -1,21 +0,0 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Main</title>
<script src="output/elm.opt.transformed.js"></script>
</head>
<body>
<div id="myapp"></div>
<script>
var app = Elm.Run.init({
node: document.getElementById('myapp'),
});
window.results = [];
app.ports.reportResults.subscribe(function(message) {
window.results = message;
document.title = 'done';
});
</script>
</body>
</html>

View File

@ -1,25 +1,16 @@
port module Main exposing (main)
module Suite exposing (suite)
{-| -}
import Benchmark exposing (..)
import Benchmark.Runner exposing (BenchmarkProgram, program)
import Benchmark.Runner.Json
import Element2 exposing (..)
import Element2.Background as Background
import Element2.Font as Font
import Html
import Html.Attributes as Attr
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults suite
port reportResults : Json.Encode.Value -> Cmd msg
three =
List.repeat 3 0

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,64 @@
module V8.Debug exposing (memory, optimizationStatus, reportV8StatusForBenchmarks)
{-| -}
import Json.Encode
memory : String -> a -> a
memory tag value =
value
type Status
= Status Int
optimizationStatus : String -> a -> a
optimizationStatus tag value =
value
{-|
hasFastProperties obj
hasFastSmiElements obj
hasFastObjectElements obj
hasFastDoubleElements obj
hasDictionaryElements obj
hasFastHoleyElements obj
haveSameMap ( obj1, obj2 )
isValidSmi obj
isSmi obj
hasFastSmiOrObjectElements obj
hasSloppyArgumentsElements obj
-}
type alias Memory =
{ tag : String
, hasFastProperties : Bool
, hasFastSmiElements : Bool
, hasFastObjectElements : Bool
, hasFastDoubleElements : Bool
, hasDictionaryElements : Bool
, hasFastHoleyElements : Bool
, isValidSmi : Bool
, isSmi : Bool
, hasFastSmiOrObjectElements : Bool
, hasSloppyArgumentsElements : Bool
}
reportV8StatusForBenchmarks : () -> Json.Encode.Value
reportV8StatusForBenchmarks _ =
Json.Encode.null

View File

@ -1,22 +0,0 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Main</title>
<script src="output/elm.opt.js"></script>
</head>
<body>
<div id="myapp"></div>
<script>
var app = Elm.Main.init({
node: document.getElementById('myapp'),
});
window.results = [];
app.ports.reportResults.subscribe(function(message) {
window.results = message;
document.title = 'done';
});
</script>
</body>
</html>

View File

@ -1,21 +0,0 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Main</title>
<script src="output/elm.opt.transformed.js"></script>
</head>
<body>
<div id="myapp"></div>
<script>
var app = Elm.Main.init({
node: document.getElementById('myapp'),
});
window.results = [];
app.ports.reportResults.subscribe(function(message) {
window.results = message;
document.title = 'done';
});
</script>
</body>
</html>

View File

@ -1,24 +1,11 @@
port module Main exposing (main)
module Suite exposing (suite)
{-| -}
import Benchmark exposing (..)
import Benchmark.Runner exposing (BenchmarkProgram, program)
import Benchmark.Runner.Json
import Element exposing (..)
import Element.Background as Background
import Element.Font as Font
import Html
import Html.Attributes as Attr
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults suite
port reportResults : Json.Encode.Value -> Cmd msg
three =

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,64 @@
module V8.Debug exposing (memory, optimizationStatus, reportV8StatusForBenchmarks)
{-| -}
import Json.Encode
memory : String -> a -> a
memory tag value =
value
type Status
= Status Int
optimizationStatus : String -> a -> a
optimizationStatus tag value =
value
{-|
hasFastProperties obj
hasFastSmiElements obj
hasFastObjectElements obj
hasFastDoubleElements obj
hasDictionaryElements obj
hasFastHoleyElements obj
haveSameMap ( obj1, obj2 )
isValidSmi obj
isSmi obj
hasFastSmiOrObjectElements obj
hasSloppyArgumentsElements obj
-}
type alias Memory =
{ tag : String
, hasFastProperties : Bool
, hasFastSmiElements : Bool
, hasFastObjectElements : Bool
, hasFastDoubleElements : Bool
, hasDictionaryElements : Bool
, hasFastHoleyElements : Bool
, isValidSmi : Bool
, isSmi : Bool
, hasFastSmiOrObjectElements : Bool
, hasSloppyArgumentsElements : Bool
}
reportV8StatusForBenchmarks : () -> Json.Encode.Value
reportV8StatusForBenchmarks _ =
Json.Encode.null

View File

@ -1,22 +0,0 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Main</title>
<script src="output/elm.opt.js"></script>
</head>
<body>
<div id="myapp"></div>
<script>
var app = Elm.Main.init({
node: document.getElementById('myapp'),
});
window.results = [];
app.ports.reportResults.subscribe(function(message) {
window.results = message;
document.title = 'done';
});
</script>
</body>
</html>

View File

@ -1,21 +0,0 @@
<html>
<head>
<meta charset="UTF-8" />
<title>Main</title>
<script src="output/elm.opt.transformed.js"></script>
</head>
<body>
<div id="myapp"></div>
<script>
var app = Elm.Main.init({
node: document.getElementById('myapp'),
});
window.results = [];
app.ports.reportResults.subscribe(function(message) {
window.results = message;
document.title = 'done';
});
</script>
</body>
</html>

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,14 @@
port module V8.Benchmark exposing (main)
{-| -}
import Benchmark.Runner.Json
import Suite
import Json.Encode
main : Benchmark.Runner.Json.JsonBenchmark
main =
Benchmark.Runner.Json.program reportResults Suite.suite
port reportResults : Json.Encode.Value -> Cmd msg

View File

@ -0,0 +1,64 @@
module V8.Debug exposing (memory, optimizationStatus, reportV8StatusForBenchmarks)
{-| -}
import Json.Encode
memory : String -> a -> a
memory tag value =
value
type Status
= Status Int
optimizationStatus : String -> a -> a
optimizationStatus tag value =
value
{-|
hasFastProperties obj
hasFastSmiElements obj
hasFastObjectElements obj
hasFastDoubleElements obj
hasDictionaryElements obj
hasFastHoleyElements obj
haveSameMap ( obj1, obj2 )
isValidSmi obj
isSmi obj
hasFastSmiOrObjectElements obj
hasSloppyArgumentsElements obj
-}
type alias Memory =
{ tag : String
, hasFastProperties : Bool
, hasFastSmiElements : Bool
, hasFastObjectElements : Bool
, hasFastDoubleElements : Bool
, hasDictionaryElements : Bool
, hasFastHoleyElements : Bool
, isValidSmi : Bool
, isSmi : Bool
, hasFastSmiOrObjectElements : Bool
, hasSloppyArgumentsElements : Bool
}
reportV8StatusForBenchmarks : () -> Json.Encode.Value
reportV8StatusForBenchmarks _ =
Json.Encode.null