git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH v2 0/3] Adding a performance framework
@ 2012-02-16 21:41 Thomas Rast
  2012-02-16 21:41 ` [PATCH v2 1/3] Move the user-facing test library to test-lib-functions.sh Thomas Rast
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Thomas Rast @ 2012-02-16 21:41 UTC (permalink / raw)
  To: git

This is a reroll of the original RFC at

  http://thread.gmane.org/gmane.comp.version-control.git/187127

Basically, a perf framework that uses little perf scripts written in
the style we already use in the test suite.

As Junio pointed out, the line between GIT_BUILD_DIR and
GIT_TEST_INSTALLED was not very clear cut or well adhered to, so I
threw out the overrides for the former.  This also made
GIT-TEST-OPTIONS moot.

There are no other changes, though I did a rebase on current next.


Thomas Rast (3):
  Move the user-facing test library to test-lib-functions.sh
  Introduce a performance testing framework
  Add a performance test for git-grep

 Makefile                        |   22 +-
 t/Makefile                      |   43 ++-
 t/perf/.gitignore               |    2 +
 t/perf/Makefile                 |   15 +
 t/perf/README                   |  146 +++++++
 t/perf/aggregate.perl           |  166 ++++++++
 t/perf/min_time.perl            |   21 +
 t/perf/p0000-perf-lib-sanity.sh |   41 ++
 t/perf/p0001-rev-list.sh        |   17 +
 t/perf/p7810-grep.sh            |   23 ++
 t/perf/perf-lib.sh              |  198 +++++++++
 t/perf/run                      |   82 ++++
 t/test-lib-functions.sh         |  835 +++++++++++++++++++++++++++++++++++++++
 t/test-lib.sh                   |  574 ++--------------------------
 14 files changed, 1633 insertions(+), 552 deletions(-)
 create mode 100644 t/perf/.gitignore
 create mode 100644 t/perf/Makefile
 create mode 100644 t/perf/README
 create mode 100755 t/perf/aggregate.perl
 create mode 100755 t/perf/min_time.perl
 create mode 100755 t/perf/p0000-perf-lib-sanity.sh
 create mode 100755 t/perf/p0001-rev-list.sh
 create mode 100755 t/perf/p7810-grep.sh
 create mode 100644 t/perf/perf-lib.sh
 create mode 100755 t/perf/run
 create mode 100644 t/test-lib-functions.sh

-- 
1.7.9.1.334.gd1409

^ permalink raw reply	[flat|nested] 26+ messages in thread
* [PATCH v2 0/2] refactoring branch colorization to ref-filter
@ 2018-11-11 23:58 nbelakovski
  2018-12-16 21:57 ` [PATCH v3 0/3] nbelakovski
  0 siblings, 1 reply; 26+ messages in thread
From: nbelakovski @ 2018-11-11 23:58 UTC (permalink / raw)
  To: rafa.almas; +Cc: avarab, git, nbelakovski, peff

From: Nickolai Belakovski <nbelakovski@gmail.com>

Finally found some time to follow up on this :)

I decided to take the approach suggested by Peff for simplicity. I have
another version which uses a hash map to store *all* of the information
returned by get_worktrees, information which can then be accessed in
the fashion %(workree:path) or %(worktree:is_detached), but it seemed
like a lot of code to add and there was no use case to justify the
addition of a hash map at this time. If there's interest though, I can
make a separate patch after this one to introduce those changes. They
build directly off of the changes introduced here.

I've split this work into two commits since the items are logically
separate.

CI results: https://travis-ci.org/nbelakovski/git/builds/453723727

Nickolai Belakovski (2):
  ref-filter: add worktree atom
  branch: Mark and colorize a branch differently if it is checked out in
    a linked worktree

 builtin/branch.c               | 22 +++++++++++++---------
 color.h                        | 18 ++++++++++++++++++
 ref-filter.c                   | 31 +++++++++++++++++++++++++++++++
 t/t3200-branch.sh              |  8 ++++----
 t/t3203-branch-output.sh       | 21 +++++++++++++++++++++
 t/t6302-for-each-ref-filter.sh | 15 +++++++++++++++
 t/test-lib-functions.sh        |  6 ++++++
 7 files changed, 108 insertions(+), 13 deletions(-)

-- 
2.14.2


^ permalink raw reply	[flat|nested] 26+ messages in thread
* [PATCH v2 0/3] bundle.c: remove "ref_list" in favor of string-list.c API
@ 2021-06-21 15:16 Ævar Arnfjörð Bjarmason
  2021-06-30 14:06 ` [PATCH v3 0/3] Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 26+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2021-06-21 15:16 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Jeff King, Johannes Schindelin, Andrei Rybak,
	Ævar Arnfjörð Bjarmason

This v2 addresses an omission noted by Andrei Rybak[1]. I didn't
factor out the "name" into a variable in 2/3 for ease of reading
3/3. That's now done.

1. https://lore.kernel.org/git/23c4ce5f-7769-1d2c-3a97-ac9733f73a25@gmail.com/

Ævar Arnfjörð Bjarmason (3):
  bundle cmd: stop leaking memory from parse_options_cmd_bundle()
  bundle.c: use a temporary variable for OIDs and names
  bundle: remove "ref_list" in favor of string-list.c API

 builtin/bundle.c | 91 ++++++++++++++++++++++++++++++++----------------
 bundle.c         | 74 ++++++++++++++++++++++-----------------
 bundle.h         | 20 +++++------
 transport.c      | 12 +++++--
 4 files changed, 122 insertions(+), 75 deletions(-)

Range-diff against v1:
1:  f4191088ac3 = 1:  932c0883ce0 bundle cmd: stop leaking memory from parse_options_cmd_bundle()
2:  f297fd0432a ! 2:  7e0d57951e5 bundle.c: use a temporary variable for OIDs and names
    @@ bundle.c: int verify_bundle(struct repository *r,
      	for (i = 0; i < p->nr; i++) {
      		struct ref_list_entry *e = p->list + i;
     -		struct object *o = parse_object(r, &e->oid);
    ++		const char *name = e->name;
     +		struct object_id *oid = &e->oid;
     +		struct object *o = parse_object(r, oid);
      		if (o) {
      			o->flags |= PREREQ_MARK;
    - 			add_pending_object(&revs, o, e->name);
    -@@ bundle.c: int verify_bundle(struct repository *r,
    +-			add_pending_object(&revs, o, e->name);
    ++			add_pending_object(&revs, o, name);
    + 			continue;
      		}
      		if (++ret == 1)
      			error("%s", message);
     -		error("%s %s", oid_to_hex(&e->oid), e->name);
    -+		error("%s %s", oid_to_hex(oid), e->name);
    ++		error("%s %s", oid_to_hex(oid), name);
      	}
      	if (revs.pending.nr != p->nr)
      		return ret;
    @@ bundle.c: int verify_bundle(struct repository *r,
      	for (i = 0; i < p->nr; i++) {
      		struct ref_list_entry *e = p->list + i;
     -		struct object *o = parse_object(r, &e->oid);
    ++		const char *name = e->name;
     +		struct object_id *oid = &e->oid;
     +		struct object *o = parse_object(r, oid);
      		assert(o); /* otherwise we'd have returned early */
    @@ bundle.c: int verify_bundle(struct repository *r,
      		if (++ret == 1)
      			error("%s", message);
     -		error("%s %s", oid_to_hex(&e->oid), e->name);
    -+		error("%s %s", oid_to_hex(oid), e->name);
    ++		error("%s %s", oid_to_hex(oid), name);
      	}
      
      	/* Clean up objects used, as they will be reused. */
    @@ bundle.c: int verify_bundle(struct repository *r,
     
      ## transport.c ##
     @@ transport.c: static struct ref *get_refs_from_bundle(struct transport *transport,
    + 
      	for (i = 0; i < data->header.references.nr; i++) {
      		struct ref_list_entry *e = data->header.references.list + i;
    - 		struct ref *ref = alloc_ref(e->name);
    +-		struct ref *ref = alloc_ref(e->name);
     -		oidcpy(&ref->old_oid, &e->oid);
    ++		const char *name = e->name;
    ++		struct ref *ref = alloc_ref(name);
     +		struct object_id *oid = &e->oid;
     +		oidcpy(&ref->old_oid, oid);
      		ref->next = result;
3:  887313d3b02 ! 3:  9d9cb5aaf9e bundle: remove "ref_list" in favor of string-list.c API
    @@ bundle.c: int verify_bundle(struct repository *r,
      	repo_init_revisions(r, &revs, NULL);
      	for (i = 0; i < p->nr; i++) {
     -		struct ref_list_entry *e = p->list + i;
    +-		const char *name = e->name;
     -		struct object_id *oid = &e->oid;
     +		struct string_list_item *e = p->items + i;
    ++		const char *name = e->string;
     +		struct object_id *oid = e->util;
      		struct object *o = parse_object(r, oid);
      		if (o) {
      			o->flags |= PREREQ_MARK;
    --			add_pending_object(&revs, o, e->name);
    -+			add_pending_object(&revs, o, e->string);
    - 			continue;
    - 		}
    - 		if (++ret == 1)
    - 			error("%s", message);
    --		error("%s %s", oid_to_hex(oid), e->name);
    -+		error("%s %s", oid_to_hex(oid), e->string);
    - 	}
    - 	if (revs.pending.nr != p->nr)
    - 		return ret;
     @@ bundle.c: int verify_bundle(struct repository *r,
      			i--;
      
      	for (i = 0; i < p->nr; i++) {
     -		struct ref_list_entry *e = p->list + i;
    +-		const char *name = e->name;
     -		struct object_id *oid = &e->oid;
     +		struct string_list_item *e = p->items + i;
    ++		const char *name = e->string;
     +		const struct object_id *oid = e->util;
      		struct object *o = parse_object(r, oid);
      		assert(o); /* otherwise we'd have returned early */
      		if (o->flags & SHOWN)
    - 			continue;
    - 		if (++ret == 1)
    - 			error("%s", message);
    --		error("%s %s", oid_to_hex(oid), e->name);
    -+		error("%s %s", oid_to_hex(oid), e->string);
    - 	}
    +@@ bundle.c: int verify_bundle(struct repository *r,
      
      	/* Clean up objects used, as they will be reused. */
      	for (i = 0; i < p->nr; i++) {
    @@ transport.c: static struct ref *get_refs_from_bundle(struct transport *transport
      
      	for (i = 0; i < data->header.references.nr; i++) {
     -		struct ref_list_entry *e = data->header.references.list + i;
    --		struct ref *ref = alloc_ref(e->name);
    --		struct object_id *oid = &e->oid;
    +-		const char *name = e->name;
     +		struct string_list_item *e = data->header.references.items + i;
    -+		struct ref *ref = alloc_ref(e->string);
    -+		const struct object_id *oid = e->util;
    ++		const char *name = e->string;
    + 		struct ref *ref = alloc_ref(name);
    +-		struct object_id *oid = &e->oid;
    ++		struct object_id *oid = e->util;
      		oidcpy(&ref->old_oid, oid);
      		ref->next = result;
      		result = ref;
-- 
2.32.0.599.g3967b4fa4ac


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2021-07-01 10:53 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-16 21:41 [PATCH v2 0/3] Adding a performance framework Thomas Rast
2012-02-16 21:41 ` [PATCH v2 1/3] Move the user-facing test library to test-lib-functions.sh Thomas Rast
2012-02-16 22:14   ` Junio C Hamano
2012-02-17  9:00     ` Thomas Rast
2012-02-17 10:25     ` [PATCH v3 0/3] Thomas Rast
2012-02-17 10:25       ` [PATCH v3 1/3] Move the user-facing test library to test-lib-functions.sh Thomas Rast
2012-02-17 10:25       ` [PATCH v3 2/3] Introduce a performance testing framework Thomas Rast
2012-02-17 10:25       ` [PATCH v3 3/3] Add a performance test for git-grep Thomas Rast
2012-02-17 17:03       ` [PATCH v3 0/3] Junio C Hamano
2012-02-17 23:28         ` Junio C Hamano
2012-02-18  0:51           ` Jeff King
2012-02-18  7:27             ` Junio C Hamano
2012-02-18  8:52               ` Jeff King
2012-02-18 10:06                 ` SIGPIPE handling (Re: [PATCH v3 0/3]) Jonathan Nieder
2012-02-18 10:10                   ` Jonathan Nieder
2012-02-18 10:24                   ` Jeff King
2012-02-16 21:41 ` [PATCH v2 2/3] Introduce a performance testing framework Thomas Rast
2012-02-17  7:45   ` Jeff King
2012-02-16 21:41 ` [PATCH v2 3/3] Add a performance test for git-grep Thomas Rast
  -- strict thread matches above, loose matches on Subject: below --
2018-11-11 23:58 [PATCH v2 0/2] refactoring branch colorization to ref-filter nbelakovski
2018-12-16 21:57 ` [PATCH v3 0/3] nbelakovski
2018-12-18 17:25   ` Jeff King
2021-06-21 15:16 [PATCH v2 0/3] bundle.c: remove "ref_list" in favor of string-list.c API Ævar Arnfjörð Bjarmason
2021-06-30 14:06 ` [PATCH v3 0/3] Ævar Arnfjörð Bjarmason
2021-06-30 17:34   ` Jeff King
2021-06-30 17:45     ` Jeff King
2021-06-30 18:00       ` Ævar Arnfjörð Bjarmason
2021-07-01 10:53         ` Ævar Arnfjörð Bjarmason

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).