profile
viewpoint
Szalay Kristóf littletof MSc CS student at Budapest University of Technology and Economics

littletof/prettyBenching 9

🦕 A small lib to make your Deno benchmarking progress and results look pretty

littletof/deno 0

A secure JavaScript and TypeScript runtime

littletof/deno_website2 0

deno.land website

push eventlittletof/testEach

littletof

commit sha 8308a522718f558426e7c74fd4baa2c2a117ba27

Initial commit

view details

push time in 11 minutes

create barnchlittletof/testEach

branch : master

created branch time in 26 minutes

created repositorylittletof/testEach

created time in 30 minutes

push eventlittletof/prettyBenching

littletof

commit sha 3acfd88d530a84d0ec427726c7e830b39e530494

Lint

view details

push time in 44 minutes

create barnchlittletof/prettyBenching

branch : feature/tests

created branch time in an hour

starteddenoland/deno_registry2

started time in 2 hours

issue commentlittletof/prettyBenching

BenchmarkResults table

Hy @buttercubz! I'm glad, you like this project!

Can you provide the code for the indicator please? Do you have a space after the emoji?

🚀 works for me, but tried ⚗ and it also doesn't align for me, its shorter.

Will work out something to fix this.

buttercubz

comment created time in a day

startedactions-js/profile-readme

started time in 2 days

delete branch littletof/prettyBenching

delete branch : chore/update_readme

delete time in 2 days

delete branch littletof/prettyBenching

delete branch : fix/markdown_empty_group_result

delete time in 2 days

delete branch littletof/prettyBenching

delete branch : feature/benchmark_down

delete time in 2 days

delete branch littletof/prettyBenching

delete branch : fix/dont_require_options

delete time in 2 days

delete branch littletof/prettyBenching

delete branch : refactor_coloring

delete time in 2 days

delete branch littletof/prettyBenching

delete branch : cards_refactor

delete time in 2 days

created taglittletof/prettyBenching

tagv0.2.1

🦕 A small lib to make your Deno benchmarking progress and results look pretty

created time in 2 days

release littletof/prettyBenching

v0.2.1

released time in 2 days

push eventlittletof/prettyBenching

Szalay Kristóf

commit sha 20c5fa8de39e8f1aeb3d2470e12d18d152c577da

Chores for v0.2.1 (#12) * Add more sample code to prettyBenchmarkDown * Bump versions of deps and module * Capitalise extraMetrics titles * Only trigger CI actions on PR

view details

push time in 2 days

push eventlittletof/prettyBenching

littletof

commit sha fc4889878f6089d89d88666b1fbb0aa16b7b2a54

Finalise

view details

push time in 2 days

push eventlittletof/prettyBenching

littletof

commit sha 67a95b66b2818c899883f3dbe69e2477a6b54769

Only trigger CI actions on PR

view details

push time in 3 days

push eventlittletof/prettyBenching

littletof

commit sha 297a7500ad72e9adbc7448d4cb6922fec7c6556c

Capitalise extraMetrics titles

view details

push time in 3 days

PR opened littletof/prettyBenching

Chores for v0.2.1
+130 -41

0 comment

9 changed files

pr created time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha e60c45096db31ebdf2d4cd107761d69726f5b888

Bump versions of deps and module

view details

push time in 4 days

create barnchlittletof/prettyBenching

branch : chore/update_readme

created branch time in 4 days

push eventlittletof/prettyBenching

Szalay Kristóf

commit sha 1c1b63db90e0df9301f99bf72af216cc627e6ae1

Fix/prettyBenchmarkDown empty group's result (#11) * FIX empty group results

view details

push time in 4 days

issue closedlittletof/prettyBenching

Stuggling to get Markdown working

This is what I am getting when I try to run it.

I am using a small sample of your code, and it does not seem to run.

error: Uncaught TypeError: Cannot read property 'replace' of undefined
    ? `${code.open}${str.replace(code.regexp, code.open)}${code.close}`
                         ^
    at run (colors.ts:54:26)
    at red (colors.ts:95:10)
    at benchmarks.ts:46:19
  runBenchmarks({ silent: true, skip: /_long/ })
    .then(
      prettyBenchmarkDown(console.log, {
        title: "Example Markdown",
        description: (runResult: BenchmarkRunResult) =>
          `This markdown was generated with the use of \`prettyBenchmarkDown\`.\nIf you use a function for the \`description\` or \`afterTables\`, you can process the results here as well: \n\n > In this benchmark ${runResult.results.length} benches were run, ${runResult.filtered} were filtered.`,
        afterTables:
          "\n---\n\nThis is the `afterTables`. This behaves the same as `description`, it just puts this at the bottom of the markdown.\nHere its defined with a simple string.\n\nCheck out the Github Action, which comments a markdown like this on PRs: $link",
        groups: [
          {
            include: /array/,
            name: "Default columns and dynamic text",
            description:
              "This is a group's `description`.\nHere you can see what the default columns are, and how you can use a `function` as `description` or `afterTable` inside a group",
            afterTable: (
              gr: BenchmarkResult[],
              g: GroupDefinition,
              rr: BenchmarkRunResult
            ) =>
              `This is a group's \`afterTable\`.\nHere you can access eg. the group name: \`${g.name}\`, benchmarks in this group: \`${gr.length}\` of them here, or the whole \`BenchmarkRunResult\`: \`${rr.results.length}\` benchmarks total`,
            columns: [...defaultColumns],
          },
        ],
      })
    )
    .catch((e: BenchmarkRunError) => {
      console.log(red(e.benchmarkName as string));
      console.error(red(e.stack as string));
    });

closed time in 4 days

khrome83

issue commentlittletof/prettyBenching

Stuggling to get Markdown working

You got the error, because in the afterTable function the parameter gr was undefined, because the group was empty. It was empty because include did not match any of your benchmark names.

This should be fixed with #11, where these functions will recieve an empty array for gr, if the same case happens and the gr would be empty.

You got that specific error, because your catch branch caught an error, on which benchmarkName is undefined, and Deno's coloring functions fail, when you provide undefined to them. 😕 It would be better to remove that line, or at least put it below e.stack. ( I know this catch was in examples in this repo, but since I tried to remove them for this exact reason. If you know any that is still present, please point to it )

khrome83

comment created time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha 2c311c2bdd7b68d617bcb448fe6b4b5eb29481e5

Fmt

view details

push time in 4 days

create barnchlittletof/prettyBenching

branch : fix/markdown_empty_group_result

created branch time in 4 days

issue commentlittletof/prettyBenching

Stuggling to get Markdown working

Will take a look at it tomorrow.

There is no coloring inside prettyBenchmarkDown if I'm correct, so is comes from somewhere else. I got errors like this, when trying to use color functions on undefined vaules , so maybe an error is thrown, where e.benchmarkName is undefined.

Can you check is this is the case please?

khrome83

comment created time in 4 days

PublicEvent

created taglittletof/prettyBenching

tagv0.2.0

🦕 A small lib to make your Deno benchmarking progress and results look pretty

created time in 4 days

release littletof/prettyBenching

v0.2.0

released time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha e1eb222e51c5dffdabc6384e75df49da447d08d6

Fix readme links

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha 5a0f0b60593dfff5d742a98db03fd0adbe995a9c

Update versions, add links

view details

push time in 4 days

push eventlittletof/prettyBenching

Szalay Kristóf

commit sha 457167bcd5bc1ae41480b3ecd5b61ac8b64f192c

Feature/benchmark down (#9) * BREAKING refactor interfaces * BREAKING `tableColor` was renamed to `color` in the unified `BenchIndicator` interface * Added `prettyBenchmarkDown` to support Markdown generation * Bump dependecies in `deps.ts` and `CI` * FIX median calculating * Improve options handling * Fix showcase module * Update readme with benchmarkDown * Add examples

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha d1b9ce513331d9aa869f5e21dfa069c61af299cb

Update README

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha 66b5fc6ea658a5fd6178f68f3d16687323f47a13

Fix example

view details

push time in 4 days

PR opened littletof/prettyBenching

Feature/benchmark down
+1091 -181

0 comment

23 changed files

pr created time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha b79fd4377b6f2a79c62e4a244e84e0853c5990ef

Add links

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha 6cff6489ec12aece29eed97a5eb48b76335a4393

Add examples

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha 19fa9c2d37133eabb5dd1aef7108555a1b2110c0

Fmt

view details

littletof

commit sha aba4d532fb4dcd00a866b2aa8400650ccdcf3f18

Lint

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha 1902d275ca7d6556b6aa54f666419591965f673c

Fix grouping and handle empty groups

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha 5a9be260d5ac38bfdc7dc3ef2c523006f320104e

Fmt

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha 813fe8ce79c3e716a46a71c92b0ed15b0c3a2446

Fix toFixed

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha 6bc436512145e2a572281c7ff1b0c1ba48fa3b78

Lint

view details

littletof

commit sha 9f5ba99d56cd08d0fa42233cae19d3c0e3304875

Use cd in extraMetrics, fix stringOrFunction undefined

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha f0162ab43371314181acaf6ca36bf375d1a8d230

Update readme with benchmarkDown

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha 38fe9acdb6c470e3066e8e846782e55b50608711

Support function as description or afterTable

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha 1c63b191de6f402f62ff8c3b85bb2f8207ba73ed

Fmt

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha e09cce2e6ca9e08046f0b6abf053600eb2b03b9c

New line after description

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha 0e2d9c9832c35cb6a58934b65ce432358fe86751

Fix group ordering

view details

push time in 4 days

push eventlittletof/prettyBenching

littletof

commit sha 98d75fb0839545e397b1e3ab8d8e39a4487c8a3c

Change to key

view details

push time in 5 days

push eventlittletof/prettyBenching

littletof

commit sha 0d0340049c6c9fadb993d75353573b57b26c1c7c

Do not show ungrouped, when empty

view details

push time in 5 days

push eventlittletof/prettyBenching

littletof

commit sha eaa4bcef35abb3d51201a88bdfd8382aa9e2a397

Fix showcase module

view details

push time in 5 days

push eventlittletof/prettyBenching

littletof

commit sha 1e7e4c6eb44a30ab3792c4ec91e6d9e1a5f3d7e2

Fmt

view details

push time in 5 days

push eventlittletof/prettyBenching

littletof

commit sha 2175c7c3a70db43fb76f313b13bdf9ae34037c1b

Bump deps

view details

push time in 5 days

push eventlittletof/prettyBenching

littletof

commit sha ff94c983611066e67a7aed4e79df5a05c872edbd

FIX median calculating

view details

littletof

commit sha f27d6d8ea27e153d7b6ad0a00c3a7740153404cf

Add extra metrics columns

view details

littletof

commit sha ea7f82dde9c54bb660032f10607f9b82ae44e385

Improve options handling

view details

push time in 5 days

push eventlittletof/prettyBenching

littletof

commit sha 24b691e277df3492f30d2958e5e7a9ca93b6d3dc

ReFmt

view details

push time in 5 days

push eventlittletof/prettyBenching

littletof

commit sha 8d691494444c51d94c584481c3e1872623dd6f03

Update Deno in CI

view details

push time in 5 days

push eventlittletof/prettyBenching

littletof

commit sha 658cb13a21da1a3d56fcdb08443b7e10384060d2

Fmt + lint

view details

littletof

commit sha 2c4c069491395c5fafff55a2015595f9fbf6dae3

Fix mod

view details

push time in 5 days

push eventlittletof/prettyBenching

littletof

commit sha 8c1045ff13b7196fbccbc0eb32b20b01445e3784

Reorganise things

view details

littletof

commit sha d3ab17374f9fc86c28627507f62c21fcabf87b8f

preserve tester

view details

littletof

commit sha ba6b8901e39c0610ea6a3969638d0a11dd8b922c

Remove tester

view details

push time in 5 days

push eventlittletof/prettyBenching

littletof

commit sha 38f4d6499995fdb6e4a917056a67cc63de00f8bd

Move outputFn outside of options

view details

push time in 5 days

push eventlittletof/prettyBenching

littletof

commit sha 9700eb3a667b3aaa0914655419ac1082873f8a9f

Change threshold chars

view details

push time in 5 days

push eventlittletof/prettyBenching

littletof

commit sha 78c470991be053532874ca3801e8550dbf7c0175

in group column defs

view details

push time in 5 days

push eventlittletof/prettyBenching

littletof

commit sha e812b9234feece14af58a90b191d8999453cf1a9

Change unmatched

view details

push time in 5 days

push eventlittletof/prettyBenching

littletof

commit sha 9db3b8f55e7872e75d9e6068cd9c6299aea72b6d

Add threshold columns, improve things

view details

push time in 5 days

create barnchlittletof/prettyBenching

branch : feature/benchmark_down

created branch time in 8 days

issue openedtimburgan/timburgan

chess|move|c1f4|2496

Just push 'Submit new issue'. You don't need to do anything else.

created time in 11 days

issue openedtimburgan/timburgan

chess|move|f6g4|2496

Just push 'Submit new issue'. You don't need to do anything else.

created time in 11 days

startednestdotland/deno_swc

started time in 11 days

startedcrewdevio/Trex

started time in 13 days

delete branch littletof/prettyBenching

delete branch : feature/error_handling

delete time in 17 days

created taglittletof/prettyBenching

tagv0.1.2

🦕 A small lib to make your Deno benchmarking progress and results look pretty

created time in 17 days

release littletof/prettyBenching

v0.1.2

released time in 17 days

PR merged littletof/prettyBenching

Feature/error handling
  • Bump deno versions
  • Handle error during benchmarking in prettyBenchmarkProgress
  • Add runnable example
  • Improve README
+145 -147

0 comment

6 changed files

littletof

pr closed time in 17 days

push eventlittletof/prettyBenching

Szalay Kristóf

commit sha 86ceb41e027348ce751f2db1fd07133ebc079154

Feature/error handling (#8) - Bump deno versions - Handle error during benchmarking in prettyBenchmarkProgress - Add runnable example - Improve README

view details

push time in 17 days

push eventlittletof/prettyBenching

littletof

commit sha af75b24acb9443031e8ada5082cf2dd1560d3a2b

Fmt

view details

push time in 17 days

PR opened littletof/prettyBenching

Feature/error handling
  • Bump deno versions
  • Handle error during benchmarking in prettyBenchmarkProgress
  • Add runnable example
  • Improve README
+139 -147

0 comment

6 changed files

pr created time in 17 days

push eventlittletof/prettyBenching

littletof

commit sha 518de85351a4c843aa7f7260a841053b98704781

Improve README

view details

push time in 17 days

create barnchlittletof/prettyBenching

branch : feature/error_handling

created branch time in 17 days

startedalosaur/alosaur

started time in 19 days

startedalosaur/angular_deno

started time in 19 days

Pull request review commentdrashland/rhum

Make lint pass

 export class RhumRunner {    *     The object containing the member to stub.    * @param string member    *     The member to stub.-   * @param any value+   * @param unknown value    *     The return value of the stubbed member.    *    * @return this    *     Return this so that stub() calls can be chained.    */-  public stub(obj: any, member: string, value: any): this {+  public stub<T>(obj: Stubed<T>, member: keyof T, value: unknown): this {     if (!obj.calls) {       obj.calls = {};     }     if (!obj.calls[member]) {-      obj.calls[member] = 0;+      // deno-fmt-ignore TODO https://github.com/denoland/deno/issues/6477+      (obj.calls[member] as number) = 0;     }      if (typeof value === "function") {-      obj[member] = function () {-        obj.calls[member]++;+      // deno-fmt-ignore TODO https://github.com/denoland/deno/issues/6477+      (obj[member] as unknown) = function () {

member is the object key (typed keyof T), obj[member] is the concrete method/property that should be added/overwritten.

littletof

comment created time in a month

Pull request review commentdrashland/rhum

Make lint pass

 export class RhumRunner {    *     The object containing the member to stub.    * @param string member    *     The member to stub.-   * @param any value+   * @param unknown value    *     The return value of the stubbed member.    *    * @return this    *     Return this so that stub() calls can be chained.    */-  public stub(obj: any, member: string, value: any): this {+  public stub<T>(obj: Stubed<T>, member: keyof T, value: unknown): this {     if (!obj.calls) {       obj.calls = {};     }     if (!obj.calls[member]) {-      obj.calls[member] = 0;+      // deno-fmt-ignore TODO https://github.com/denoland/deno/issues/6477+      (obj.calls[member] as number) = 0;     }      if (typeof value === "function") {-      obj[member] = function () {-        obj.calls[member]++;+      // deno-fmt-ignore TODO https://github.com/denoland/deno/issues/6477+      (obj[member] as unknown) = function () {+        (obj.calls[member] as number)++;         return value();       };     } else {-      obj[member] = value;+      // deno-fmt-ignore TODO https://github.com/denoland/deno/issues/6477+      (obj[member] as unknown) = value;

member is the object key (typed keyof T), obj[member] is the concrete method/property that should be added/overwritten.

littletof

comment created time in a month

push eventlittletof/rhum

littletof

commit sha 9167332d46eb5ecef2a4711fe30025459f26dbe9

Fix CI 2

view details

push time in a month

push eventlittletof/rhum

littletof

commit sha 1e1657ebf537eb2706f35e1cfe12e241eac381e0

Fix CI

view details

push time in a month

Pull request review commentdrashland/rhum

Make lint pass

 import { BufReader, ServerRequest } from "../../deps.ts"; +export interface MockServerRequestOptions {+  headers: { [key: string]: string };+  body?: Deno.Buffer;+  server?: any; // TODO what is server type+}++export interface MockServerRequest extends ServerRequest {+  server?: any; // TODO what is server type+}++export interface RequestRespondOutput extends Response { // TODO+  send: () => RequestRespondOutput;+}

Left there what remains of it, because of what the plan is with server_request

littletof

comment created time in a month

push eventlittletof/rhum

littletof

commit sha fe63a264c036ad19f12ed6b54f92ac06625be0eb

Remove server_request tests

view details

push time in a month

push eventlittletof/rhum

littletof

commit sha 6fc9adeb0b974485f42fc19f150496a681c4a66c

fix

view details

push time in a month

push eventlittletof/rhum

littletof

commit sha 49c7786d0a51250ee5da2a646188d4427df989bf

ServerRequest fixes

view details

push time in a month

Pull request review commentdrashland/rhum

Make lint pass

 export const MockServerRequest = function (   //   //   TypeError: Cannot read property 'write' of undefined   //-  request.respond = function respond(output: any) {+  request.respond = function respond(output: any) { // TODO RequestRespondOutput & different method signature than original

Removed request.respond overwriting

littletof

comment created time in a month

Pull request review commentdrashland/rhum

Make lint pass

 export class MockBuilder {    *     Get all properties--public, protected, private--from the object that    *     will be mocked.    *-   * @param any constructorFn+   * @param T obj    *     The object that will be mocked.    *    * @return string[]    *     Returns an array of the object's properties.    */-  protected getAllProperties(constructorFn: any): string[] {+  protected getAllProperties(obj: T): string[] {     let functions: string[] = [];-    let clone = constructorFn;+    let clone = obj;     do {       functions = functions.concat(Object.getOwnPropertyNames(clone));-    } while (clone = Object.getPrototypeOf(clone));+    } while (!!(clone = Object.getPrototypeOf(clone))); -    return functions.sort().filter(function (e: any, i: number, arr: any[]) {-      if (-        e != arr[i + 1] && typeof constructorFn[e] != "function"-      ) {-        return true;-      }-    });+    return functions.sort().filter(+      function (e: string, i: number, arr: unknown[]) {

will leave as a function for rn

littletof

comment created time in a month

Pull request review commentdrashland/rhum

Make lint pass

 export class MockBuilder {    *     Get all properties--public, protected, private--from the object that    *     will be mocked.    *-   * @param any constructorFn+   * @param T obj    *     The object that will be mocked.    *    * @return string[]    *     Returns an array of the object's properties.    */-  protected getAllProperties(constructorFn: any): string[] {+  protected getAllProperties(obj: T): string[] {     let functions: string[] = [];-    let clone = constructorFn;+    let clone = obj;     do {       functions = functions.concat(Object.getOwnPropertyNames(clone));-    } while (clone = Object.getPrototypeOf(clone));+    } while (!!(clone = Object.getPrototypeOf(clone))); -    return functions.sort().filter(function (e: any, i: number, arr: any[]) {-      if (-        e != arr[i + 1] && typeof constructorFn[e] != "function"-      ) {-        return true;-      }-    });+    return functions.sort().filter(+      function (e: string, i: number, arr: unknown[]) {+        if (+          e != arr[i + 1] && typeof obj[e as keyof T] != "function"+        ) {+          return true;+        }+      },+    );   }    /**    * @description    *     Get all functions--public, protected, private--from the object that    *     will be mocked.    *-   * @param any constructorFn+   * @param T obj    *     The object that will be mocked.    *    * @return string[]    *     Returns an array of the object's functions.    */-  protected getAllFunctions(constructorFn: any): string[] {+  protected getAllFunctions(obj: T): string[] {     let functions: string[] = [];-    let clone = constructorFn;+    let clone = obj;     do {       functions = functions.concat(Object.getOwnPropertyNames(clone));-    } while (clone = Object.getPrototypeOf(clone));+    } while (!!(clone = Object.getPrototypeOf(clone))); -    return functions.sort().filter(function (e: any, i: number, arr: any[]) {-      if (-        e != arr[i + 1] && typeof constructorFn[e] == "function"-      ) {-        return true;-      }-    });+    return functions.sort().filter(+      function (e: string, i: number, arr: unknown[]) {

will leave as a function for rn

littletof

comment created time in a month

Pull request review commentdrashland/rhum

Make lint pass

 import { BufReader, ServerRequest } from "../../deps.ts"; +export interface MockServerRequestOptions {+  headers: { [key: string]: string };+  body?: Deno.Buffer;+  server?: any; // TODO what is server type

removed server option property

littletof

comment created time in a month

Pull request review commentdrashland/rhum

Make lint pass

 export const MockServerRequest = function (   //   //   TypeError: Cannot read property 'write' of undefined   //-  request.respond = function respond(output: any) {+  request.respond = function respond(output: any) { // TODO RequestRespondOutput & different method signature than original     output.send = function () {

Removed request.respond overwriting

littletof

comment created time in a month

Pull request review commentdrashland/rhum

Make lint pass

 import { BufReader, ServerRequest } from "../../deps.ts"; +export interface MockServerRequestOptions {+  headers: { [key: string]: string };+  body?: Deno.Buffer;+  server?: any; // TODO what is server type+}++export interface MockServerRequest extends ServerRequest {+  server?: any; // TODO what is server type

Removed server?, left MockServerRequest empty so later can be extended

littletof

comment created time in a month

Pull request review commentdrashland/rhum

Make lint pass

 const extraChars = 10;  *     @ebebbington (https://github.com/ebebbington)  */ export class RhumRunner {-  public asserts: any;-  public mocks: any = {};+  public asserts: asserts;+  public mocks: any = {}; // TODO What will be in this besides ServerRequest

Made RhumMocks type

littletof

comment created time in a month

Pull request review commentdrashland/rhum

Make lint pass

 const extraChars = 10;  *     @ebebbington (https://github.com/ebebbington)  */ export class RhumRunner {-  public asserts: any;-  public mocks: any = {};+  public asserts: asserts;+  public mocks: any = {}; // TODO What will be in this besides ServerRequest -  protected passed_in_test_plan: string = "";+  protected passed_in_test_plan: string = ""; // TODO although internal, 'passed' can be misleading when test are in context too.

ok.

littletof

comment created time in a month

more